diff mbox

net: make skb_truesize_bug() call WARN()

Message ID 20081125141511.5eedb12a@infradead.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Arjan van de Ven Nov. 25, 2008, 10:15 p.m. UTC
On Tue, 25 Nov 2008 13:54:34 -0800 (PST)
David Miller <davem@davemloft.net> wrote:

> > I think there may be some value in them: users who want to help
> > debug this can experiment to see which configurations or traffic
> > types do or don't result in invalid truesize.
> 
> Agreed, netlimit'ing this is the best way to go.

ok

From 84515e1255c0ec2437cb62cd59de6ed9d6465fa1 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Tue, 25 Nov 2008 08:30:04 -0800
Subject: [PATCH] net: make skb_truesize_bug() call WARN()

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>
---
 net/core/skbuff.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Nov. 26, 2008, 5:08 a.m. UTC | #1
From: Arjan van de Ven <arjan@infradead.org>
Date: Tue, 25 Nov 2008 14:15:11 -0800

> On Tue, 25 Nov 2008 13:54:34 -0800 (PST)
> David Miller <davem@davemloft.net> wrote:
> 
> > > I think there may be some value in them: users who want to help
> > > debug this can experiment to see which configurations or traffic
> > > types do or don't result in invalid truesize.
> > 
> > Agreed, netlimit'ing this is the best way to go.
> 
> ok
...
> Subject: [PATCH] net: make skb_truesize_bug() call WARN()

Applied, thanks a lot Arjan.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 391be91..a939215 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -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));
 }