improved memdebug
Modified Files: mISDN/CHANGES mISDN/drivers/isdn/hardware/mISDN/memdbg.c mISDN/drivers/isdn/hardware/mISDN/memdbg.h
This commit is contained in:
parent
34458d894d
commit
c4dd8765b4
1
CHANGES
1
CHANGES
|
@ -5,3 +5,4 @@ mISDN-1-1-2:
|
||||||
- minor tweaks to misdn-init and to the Kernel-Patch script
|
- 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)
|
- 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
|
- 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/stddef.h>
|
||||||
|
#include <linux/config.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
@ -177,6 +178,24 @@ __mid_dev_alloc_skb(unsigned int size, char *fn, int line)
|
||||||
return(skb);
|
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
|
struct sk_buff
|
||||||
*__mid_skb_clone(struct sk_buff *skb, int gfp_mask, char *fn, int line)
|
*__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_vfree);
|
||||||
EXPORT_SYMBOL(__mid_alloc_skb);
|
EXPORT_SYMBOL(__mid_alloc_skb);
|
||||||
EXPORT_SYMBOL(__mid_dev_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_clone);
|
||||||
EXPORT_SYMBOL(__mid_skb_copy);
|
EXPORT_SYMBOL(__mid_skb_copy);
|
||||||
EXPORT_SYMBOL(__mid_skb_realloc_headroom);
|
EXPORT_SYMBOL(__mid_skb_realloc_headroom);
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#undef vfree
|
#undef vfree
|
||||||
#undef alloc_skb
|
#undef alloc_skb
|
||||||
#undef dev_alloc_skb
|
#undef dev_alloc_skb
|
||||||
|
#undef kfree_skb
|
||||||
|
#undef dev_kfree_skb
|
||||||
#undef skb_clone
|
#undef skb_clone
|
||||||
#undef skb_copy
|
#undef skb_copy
|
||||||
#undef skb_realloc_headroom
|
#undef skb_realloc_headroom
|
||||||
|
@ -21,6 +23,8 @@
|
||||||
#define vfree(p) __mid_vfree(p)
|
#define vfree(p) __mid_vfree(p)
|
||||||
#define alloc_skb(a, b) __mid_alloc_skb(a, b, __FILE__, __LINE__)
|
#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 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_clone(a, b) __mid_skb_clone(a, b, __FILE__, __LINE__)
|
||||||
#define skb_copy(a, b) __mid_skb_copy(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__)
|
#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 int __mid_init(void);
|
||||||
extern struct sk_buff *__mid_alloc_skb(unsigned int,int, char *, int);
|
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 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_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_copy(struct sk_buff *, int, char *, int);
|
||||||
extern struct sk_buff *__mid_skb_realloc_headroom(struct sk_buff *, unsigned int, char *, int);
|
extern struct sk_buff *__mid_skb_realloc_headroom(struct sk_buff *, unsigned int, char *, int);
|
||||||
|
|
Loading…
Reference in New Issue