* [PATCH] net: make skb_truesize_bug() call WARN() @ 2008-11-25 16:32 Arjan van de Ven 2008-11-25 16:42 ` Ben Hutchings 0 siblings, 1 reply; 7+ messages in thread From: Arjan van de Ven @ 2008-11-25 16:32 UTC (permalink / raw) To: netdev >From 97a8ab520c378568e172c555a156b469137a3828 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(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 391be91..1a1f4d1 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(1, KERN_ERR "SKB BUG: Invalid truesize (%u) " "len=%u, sizeof(sk_buff)=%Zd\n", skb->truesize, skb->len, sizeof(struct sk_buff)); } -- 1.6.0.3 -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 16:32 [PATCH] net: make skb_truesize_bug() call WARN() Arjan van de Ven @ 2008-11-25 16:42 ` Ben Hutchings 2008-11-25 17:54 ` Arjan van de Ven 0 siblings, 1 reply; 7+ messages in thread From: Ben Hutchings @ 2008-11-25 16:42 UTC (permalink / raw) To: Arjan van de Ven; +Cc: netdev On Tue, 2008-11-25 at 08:32 -0800, Arjan van de Ven wrote: > From 97a8ab520c378568e172c555a156b469137a3828 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(-) > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 391be91..1a1f4d1 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(1, KERN_ERR "SKB BUG: Invalid truesize (%u) " > "len=%u, sizeof(sk_buff)=%Zd\n", > skb->truesize, skb->len, sizeof(struct sk_buff)); > } The bug reports I've seen (with my Debian hat on, not relating to sfc) show that configurations that trigger this warning are likely to trigger many times over and there's nothing the user can do about it. So by all means do make the warning more obvious, but please make it WARN_ON_ONCE and then use printk qualified by net_ratelimit(). Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 16:42 ` Ben Hutchings @ 2008-11-25 17:54 ` Arjan van de Ven 2008-11-25 18:02 ` Ben Hutchings 0 siblings, 1 reply; 7+ messages in thread From: Arjan van de Ven @ 2008-11-25 17:54 UTC (permalink / raw) To: Ben Hutchings; +Cc: netdev On Tue, 25 Nov 2008 16:42:03 +0000 Ben Hutchings <bhutchings@solarflare.com> wrote: > On Tue, 2008-11-25 at 08:32 -0800, Arjan van de Ven wrote: > > From 97a8ab520c378568e172c555a156b469137a3828 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(-) > > > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > > index 391be91..1a1f4d1 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(1, KERN_ERR "SKB BUG: Invalid truesize (%u) " > > "len=%u, sizeof(sk_buff)=%Zd\n", > > skb->truesize, skb->len, sizeof(struct sk_buff)); > > } > > The bug reports I've seen (with my Debian hat on, not relating to > sfc) show that configurations that trigger this warning are likely to > trigger many times over and there's nothing the user can do about > it. So by all means do make the warning more obvious, but please > make it WARN_ON_ONCE and then use printk qualified by net_ratelimit(). > if there's no value in those subsequent printk's.. why not just this? From 97a8ab520c378568e172c555a156b469137a3828 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(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 391be91..1a1f4d1 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_ONCE(1, KERN_ERR "SKB BUG: Invalid truesize (%u) " "len=%u, sizeof(sk_buff)=%Zd\n", skb->truesize, skb->len, sizeof(struct sk_buff)); } -- 1.6.0.3 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 17:54 ` Arjan van de Ven @ 2008-11-25 18:02 ` Ben Hutchings 2008-11-25 21:54 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Ben Hutchings @ 2008-11-25 18:02 UTC (permalink / raw) To: Arjan van de Ven; +Cc: netdev On Tue, 2008-11-25 at 09:54 -0800, Arjan van de Ven wrote: > On Tue, 25 Nov 2008 16:42:03 +0000 > Ben Hutchings <bhutchings@solarflare.com> wrote: > > > On Tue, 2008-11-25 at 08:32 -0800, Arjan van de Ven wrote: > > > From 97a8ab520c378568e172c555a156b469137a3828 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. [...] > > The bug reports I've seen (with my Debian hat on, not relating to > > sfc) show that configurations that trigger this warning are likely to > > trigger many times over and there's nothing the user can do about > > it. So by all means do make the warning more obvious, but please > > make it WARN_ON_ONCE and then use printk qualified by net_ratelimit(). > > > > if there's no value in those subsequent printk's.. why not just this? [...] 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. Ben. -- Ben Hutchings, Senior Software Engineer, Solarflare Communications Not speaking for my employer; that's the marketing department's job. They asked us to note that Solarflare product names are trademarked. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 18:02 ` Ben Hutchings @ 2008-11-25 21:54 ` David Miller 2008-11-25 22:15 ` Arjan van de Ven 0 siblings, 1 reply; 7+ messages in thread From: David Miller @ 2008-11-25 21:54 UTC (permalink / raw) To: bhutchings; +Cc: arjan, netdev From: Ben Hutchings <bhutchings@solarflare.com> Date: Tue, 25 Nov 2008 18:02:19 +0000 > On Tue, 2008-11-25 at 09:54 -0800, Arjan van de Ven wrote: > > On Tue, 25 Nov 2008 16:42:03 +0000 > > Ben Hutchings <bhutchings@solarflare.com> wrote: > > > > > On Tue, 2008-11-25 at 08:32 -0800, Arjan van de Ven wrote: > > > > From 97a8ab520c378568e172c555a156b469137a3828 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. > [...] > > > The bug reports I've seen (with my Debian hat on, not relating to > > > sfc) show that configurations that trigger this warning are likely to > > > trigger many times over and there's nothing the user can do about > > > it. So by all means do make the warning more obvious, but please > > > make it WARN_ON_ONCE and then use printk qualified by net_ratelimit(). > > > > > > > if there's no value in those subsequent printk's.. why not just this? > [...] > > 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 21:54 ` David Miller @ 2008-11-25 22:15 ` Arjan van de Ven 2008-11-26 5:08 ` David Miller 0 siblings, 1 reply; 7+ messages in thread From: Arjan van de Ven @ 2008-11-25 22:15 UTC (permalink / raw) To: David Miller; +Cc: bhutchings, netdev 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(-) 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)); } -- 1.6.0.3 -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] net: make skb_truesize_bug() call WARN() 2008-11-25 22:15 ` Arjan van de Ven @ 2008-11-26 5:08 ` David Miller 0 siblings, 0 replies; 7+ messages in thread From: David Miller @ 2008-11-26 5:08 UTC (permalink / raw) To: arjan; +Cc: bhutchings, netdev 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. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-11-26 5:08 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-11-25 16:32 [PATCH] net: make skb_truesize_bug() call WARN() Arjan van de Ven 2008-11-25 16:42 ` Ben Hutchings 2008-11-25 17:54 ` Arjan van de Ven 2008-11-25 18:02 ` Ben Hutchings 2008-11-25 21:54 ` David Miller 2008-11-25 22:15 ` Arjan van de Ven 2008-11-26 5:08 ` David Miller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).