]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
net: make skb_truesize_bug() call WARN()
authorArjan van de Ven <arjan@linux.intel.com>
Wed, 26 Nov 2008 05:08:13 +0000 (21:08 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2008 05:08:13 +0000 (21:08 -0800)
The truesize message check is important enough to make it print "BUG"
to the user console... lets also make it important enough to spit a
backtrace/module list etc so that kerneloops.org can track them.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/skbuff.c

index d49ef8301b5bd5de20d1b8a6e57aa5144ffff28a..65f7757465bd2ed8b99c2a0934c8e5dc32c73b00 100644 (file)
@@ -149,7 +149,7 @@ void skb_under_panic(struct sk_buff *skb, int sz, void *here)
 
 void skb_truesize_bug(struct sk_buff *skb)
 {
-       printk(KERN_ERR "SKB BUG: Invalid truesize (%u) "
+       WARN(net_ratelimit(), KERN_ERR "SKB BUG: Invalid truesize (%u) "
               "len=%u, sizeof(sk_buff)=%Zd\n",
               skb->truesize, skb->len, sizeof(struct sk_buff));
 }