diff options
-rw-r--r-- | include/linux/skbuff.h | 6 | ||||
-rw-r--r-- | net/core/skbuff.c | 12 | ||||
-rw-r--r-- | net/ipv4/route.c | 3 |
3 files changed, 5 insertions, 16 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 9f2d75e4f087..22b701819619 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -83,12 +83,6 @@ | |||
83 | * Any questions? No questions, good. --ANK | 83 | * Any questions? No questions, good. --ANK |
84 | */ | 84 | */ |
85 | 85 | ||
86 | #ifdef __i386__ | ||
87 | #define NET_CALLER(arg) (*(((void **)&arg) - 1)) | ||
88 | #else | ||
89 | #define NET_CALLER(arg) __builtin_return_address(0) | ||
90 | #endif | ||
91 | |||
92 | struct net_device; | 86 | struct net_device; |
93 | 87 | ||
94 | #ifdef CONFIG_NETFILTER | 88 | #ifdef CONFIG_NETFILTER |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index c96559574a3f..1b64817d7de6 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -276,20 +276,14 @@ void kfree_skbmem(struct sk_buff *skb) | |||
276 | 276 | ||
277 | void __kfree_skb(struct sk_buff *skb) | 277 | void __kfree_skb(struct sk_buff *skb) |
278 | { | 278 | { |
279 | if (skb->list) { | 279 | BUG_ON(skb->list != NULL); |
280 | printk(KERN_WARNING "Warning: kfree_skb passed an skb still " | ||
281 | "on a list (from %p).\n", NET_CALLER(skb)); | ||
282 | BUG(); | ||
283 | } | ||
284 | 280 | ||
285 | dst_release(skb->dst); | 281 | dst_release(skb->dst); |
286 | #ifdef CONFIG_XFRM | 282 | #ifdef CONFIG_XFRM |
287 | secpath_put(skb->sp); | 283 | secpath_put(skb->sp); |
288 | #endif | 284 | #endif |
289 | if(skb->destructor) { | 285 | if (skb->destructor) { |
290 | if (in_irq()) | 286 | WARN_ON(in_irq()); |
291 | printk(KERN_WARNING "Warning: kfree_skb on " | ||
292 | "hard IRQ %p\n", NET_CALLER(skb)); | ||
293 | skb->destructor(skb); | 287 | skb->destructor(skb); |
294 | } | 288 | } |
295 | #ifdef CONFIG_NETFILTER | 289 | #ifdef CONFIG_NETFILTER |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 9f91a116d919..bb90a0c3a91e 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -1048,7 +1048,8 @@ void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst, int more) | |||
1048 | return; | 1048 | return; |
1049 | } | 1049 | } |
1050 | } else | 1050 | } else |
1051 | printk(KERN_DEBUG "rt_bind_peer(0) @%p\n", NET_CALLER(iph)); | 1051 | printk(KERN_DEBUG "rt_bind_peer(0) @%p\n", |
1052 | __builtin_return_address(0)); | ||
1052 | 1053 | ||
1053 | ip_select_fb_ident(iph); | 1054 | ip_select_fb_ident(iph); |
1054 | } | 1055 | } |