diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-04-20 01:39:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-04-20 01:39:42 -0400 |
commit | 9c2b3328f74800bb370d08bb3a4255d5fe833e94 (patch) | |
tree | 9d3092a44b592a091c4818a20bd678d1191f7a88 /net/core/skbuff.c | |
parent | 98f245e797a01611d6734c7d192240f1361439d3 (diff) |
[NET]: skbuff: remove old NET_CALLER macro
Here is a revised alternative that uses BUG_ON/WARN_ON
(as suggested by Herbert Xu) to eliminate NET_CALLER.
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 12 |
1 files changed, 3 insertions, 9 deletions
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 |