All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: ip_rt_bug questions.
Date: Sat, 21 May 2011 13:16:42 -0400	[thread overview]
Message-ID: <20110521171642.GA18411@redhat.com> (raw)
In-Reply-To: <20110418.145023.13728986.davem@davemloft.net>

On Mon, Apr 18, 2011 at 02:50:23PM -0700, David Miller wrote:
 > From: David Miller <davem@davemloft.net>
 > Date: Mon, 18 Apr 2011 14:49:09 -0700 (PDT)
 > 
 > > From: Dave Jones <davej@redhat.com>
 > > Date: Mon, 18 Apr 2011 17:48:10 -0400
 > > 
 > >> I managed to trigger this today..
 > >> 
 > >> ip_rt_bug: 0.0.0.0 -> 255.255.255.255, ?
 > >> 
 > >> if this is useful in some way, maybe it should be enhanced
 > >> to print out something else, like a backtrace ?
 > >> 
 > >> Also, should it be a printk_ratelimit() ? Or is there
 > >> ratelimiting done elsewhere in the routing code ?
 > >> 
 > >> or should it just be silenced, leaving just the kfree_skb ?
 > > 
 > > It's a very serious issue, it means we used an input route for
 > > packet output.
 > > 
 > > Kernel version and what you were doing to trigger this?
 > 
 > BTW, if you could modify this thing to spit out a stack
 > trace (probably by using WARN_ON() or similar) that will
 > probably show us where the bug is coming from.

I haven't been able to hit this again since I added the WARN_ON.
But you can guarantee that the next time I see it it will be on
a kernel where I forgot to re-add this.  Could we get this merged
so I don't have to keep remembering it ?

	Dave

Add a stack backtrace to the ip_rt_bug path for debugging

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 99e6e4b..6fb18b7 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1687,6 +1687,7 @@ static int ip_rt_bug(struct sk_buff *skb)
 		&ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr,
 		skb->dev ? skb->dev->name : "?");
 	kfree_skb(skb);
+	WARN_ON(1);
 	return 0;
 }
 



  parent reply	other threads:[~2011-05-21 17:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-18 21:48 ip_rt_bug questions Dave Jones
2011-04-18 21:49 ` David Miller
2011-04-18 21:50   ` David Miller
2011-04-18 21:59     ` Dave Jones
2011-04-19  5:04       ` David Miller
2011-04-19 18:13         ` Dave Jones
2011-04-19 19:22           ` David Miller
2011-05-21 17:16     ` Dave Jones [this message]
2011-05-23  1:02       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110521171642.GA18411@redhat.com \
    --to=davej@redhat.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.