[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>
This commit is contained in:
committed by
David S. Miller
parent
98f245e797
commit
9c2b3328f7
@@ -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
|
||||
|
Reference in New Issue
Block a user