improved memdebug

Modified Files:
 	mISDN/CHANGES mISDN/drivers/isdn/hardware/mISDN/memdbg.c
 	mISDN/drivers/isdn/hardware/mISDN/memdbg.h
master
Andreas Eversberg 16 years ago
parent 34458d894d
commit c4dd8765b4
  1. 1
      CHANGES
  2. 21
      drivers/isdn/hardware/mISDN/memdbg.c
  3. 6
      drivers/isdn/hardware/mISDN/memdbg.h

@ -5,3 +5,4 @@ mISDN-1-1-2:
- minor tweaks to misdn-init and to the Kernel-Patch script
- fix in CMX: sending is required even during PCM bridge, because sending data overrides bridging temporarily (for sending info tones during bridge)
- enabled CMX audio processing for RX data in all cases, because it is essential
- now it is save to free skb during interrupt, if memdebug is on

@ -1,4 +1,5 @@
#include <linux/stddef.h>
#include <linux/config.h>
#include <linux/module.h>
#include <linux/list.h>
#include <linux/slab.h>
@ -177,6 +178,24 @@ __mid_dev_alloc_skb(unsigned int size, char *fn, int line)
return(skb);
}
void
__mid_kfree_skb(struct sk_buff *skb)
{
if (skb->destructor)
skb->destructor(skb);
skb->destructor = NULL;
kfree_skb(skb);
}
void
__mid_dev_kfree_skb(struct sk_buff *skb)
{
if (skb->destructor)
skb->destructor(skb);
skb->destructor = NULL;
dev_kfree_skb(skb);
}
struct sk_buff
*__mid_skb_clone(struct sk_buff *skb, int gfp_mask, char *fn, int line)
{
@ -280,6 +299,8 @@ EXPORT_SYMBOL(__mid_vmalloc);
EXPORT_SYMBOL(__mid_vfree);
EXPORT_SYMBOL(__mid_alloc_skb);
EXPORT_SYMBOL(__mid_dev_alloc_skb);
EXPORT_SYMBOL(__mid_kfree_skb);
EXPORT_SYMBOL(__mid_dev_kfree_skb);
EXPORT_SYMBOL(__mid_skb_clone);
EXPORT_SYMBOL(__mid_skb_copy);
EXPORT_SYMBOL(__mid_skb_realloc_headroom);

@ -11,6 +11,8 @@
#undef vfree
#undef alloc_skb
#undef dev_alloc_skb
#undef kfree_skb
#undef dev_kfree_skb
#undef skb_clone
#undef skb_copy
#undef skb_realloc_headroom
@ -21,6 +23,8 @@
#define vfree(p) __mid_vfree(p)
#define alloc_skb(a, b) __mid_alloc_skb(a, b, __FILE__, __LINE__)
#define dev_alloc_skb(a) __mid_dev_alloc_skb(a, __FILE__, __LINE__)
#define kfree_skb(a) __mid_kfree_skb(a)
#define dev_kfree_skb(a) __mid_dev_kfree_skb(a)
#define skb_clone(a, b) __mid_skb_clone(a, b, __FILE__, __LINE__)
#define skb_copy(a, b) __mid_skb_copy(a, b, __FILE__, __LINE__)
#define skb_realloc_headroom(a, b) __mid_skb_realloc_headroom(a, b, __FILE__, __LINE__)
@ -33,6 +37,8 @@ extern void __mid_cleanup(void);
extern int __mid_init(void);
extern struct sk_buff *__mid_alloc_skb(unsigned int,int, char *, int);
extern struct sk_buff *__mid_dev_alloc_skb(unsigned int,char *, int);
extern void __mid_kfree_skb(struct sk_buff *);
extern void __mid_dev_kfree_skb(struct sk_buff *);
extern struct sk_buff *__mid_skb_clone(struct sk_buff *, int, char *, int);
extern struct sk_buff *__mid_skb_copy(struct sk_buff *, int, char *, int);
extern struct sk_buff *__mid_skb_realloc_headroom(struct sk_buff *, unsigned int, char *, int);

Loading…
Cancel
Save