From patchwork Sat May 21 17:16:42 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Jones X-Patchwork-Id: 96701 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id CF176B71AA for ; Sun, 22 May 2011 03:16:57 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753902Ab1EURQu (ORCPT ); Sat, 21 May 2011 13:16:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:25988 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753662Ab1EURQs (ORCPT ); Sat, 21 May 2011 13:16:48 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p4LHGlrO022398 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 21 May 2011 13:16:47 -0400 Received: from gelk.kernelslacker.org (ovpn-113-41.phx2.redhat.com [10.3.113.41]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p4LHGkFb016233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 21 May 2011 13:16:47 -0400 Received: from gelk.kernelslacker.org (gelk [127.0.0.1]) by gelk.kernelslacker.org (8.14.4/8.14.4) with ESMTP id p4LHGjYY018563; Sat, 21 May 2011 13:16:45 -0400 Received: (from davej@localhost) by gelk.kernelslacker.org (8.14.4/8.14.4/Submit) id p4LHGhQA018556; Sat, 21 May 2011 13:16:43 -0400 X-Authentication-Warning: gelk.kernelslacker.org: davej set sender to davej@redhat.com using -f Date: Sat, 21 May 2011 13:16:42 -0400 From: Dave Jones To: David Miller Cc: netdev@vger.kernel.org Subject: Re: ip_rt_bug questions. Message-ID: <20110521171642.GA18411@redhat.com> References: <20110418214809.GA17443@redhat.com> <20110418.144909.52209035.davem@davemloft.net> <20110418.145023.13728986.davem@davemloft.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110418.145023.13728986.davem@davemloft.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Apr 18, 2011 at 02:50:23PM -0700, David Miller wrote: > From: David Miller > Date: Mon, 18 Apr 2011 14:49:09 -0700 (PDT) > > > From: Dave Jones > > 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 --- 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 --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; }