summaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-04-19 22:39:42 -0700
committerDavid S. Miller <davem@davemloft.net>2005-04-19 22:39:42 -0700
commit9c2b3328f74800bb370d08bb3a4255d5fe833e94 (patch)
tree9d3092a44b592a091c4818a20bd678d1191f7a88 /net/core/skbuff.c
parent98f245e797a01611d6734c7d192240f1361439d3 (diff)
downloadop-kernel-dev-9c2b3328f74800bb370d08bb3a4255d5fe833e94.zip
op-kernel-dev-9c2b3328f74800bb370d08bb3a4255d5fe833e94.tar.gz
[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.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c9655957..1b64817 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -276,20 +276,14 @@ void kfree_skbmem(struct sk_buff *skb)
void __kfree_skb(struct sk_buff *skb)
{
- if (skb->list) {
- printk(KERN_WARNING "Warning: kfree_skb passed an skb still "
- "on a list (from %p).\n", NET_CALLER(skb));
- BUG();
- }
+ BUG_ON(skb->list != NULL);
dst_release(skb->dst);
#ifdef CONFIG_XFRM
secpath_put(skb->sp);
#endif
- if(skb->destructor) {
- if (in_irq())
- printk(KERN_WARNING "Warning: kfree_skb on "
- "hard IRQ %p\n", NET_CALLER(skb));
+ if (skb->destructor) {
+ WARN_ON(in_irq());
skb->destructor(skb);
}
#ifdef CONFIG_NETFILTER
OpenPOWER on IntegriCloud