From patchwork Fri Sep 18 23:06:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 519606 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 14D8E1409B7 for ; Sat, 19 Sep 2015 09:06:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752475AbbIRXGL (ORCPT ); Fri, 18 Sep 2015 19:06:11 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52091 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751811AbbIRXGJ (ORCPT ); Fri, 18 Sep 2015 19:06:09 -0400 Received: from akpm3.mtv.corp.google.com (unknown [216.239.45.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id ABE5B14FF; Fri, 18 Sep 2015 23:06:07 +0000 (UTC) Date: Fri, 18 Sep 2015 16:06:07 -0700 From: Andrew Morton To: Thierry Reding Cc: David Ahern , Fabio Estevam , Sergey Senozhatsky , "David S. Miller" , Alexey Kuznetsov , James Morris , "netdev@vger.kernel.org" , linux-kernel , richard.alpe@ericsson.com Subject: Re: [linux-next] oops in ip_route_input_noref Message-Id: <20150918160607.574425f5e3b1f0afe29b7448@linux-foundation.org> In-Reply-To: <20150917085850.GA7953@ulmo> References: <20150916092447.GA945@swordfish> <55F984EF.4040503@cumulusnetworks.com> <20150917085850.GA7953@ulmo> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 17 Sep 2015 10:58:52 +0200 Thierry Reding wrote: > On Wed, Sep 16, 2015 at 09:04:15AM -0600, David Ahern wrote: > > On 9/16/15 9:00 AM, Fabio Estevam wrote: > > >On Wed, Sep 16, 2015 at 6:24 AM, Sergey Senozhatsky > > > wrote: > > > > > >>added by b7503e0cdb5dbec5d201aa69d8888c14679b5ae8 > > >> > > >> net: Add FIB table id to rtable > > >> > > >> Add the FIB table id to rtable to make the information available for > > >> IPv4 as it is for IPv6. > > > > > >I see the same issue here when booting a mx25 ARM processor via NFS. > > > > > >defconfig is arch/arm/configs/imx_v4_v5_defconfig. > > > > > > > I am still not able to reproduce. While I work on a full Cumulus image for > > other test cases here's a patch to try; eagle eye Nikolay noted a potential > > use without init in the maze of goto's. > > > > Thanks, > > David > > > diff --git a/net/ipv4/route.c b/net/ipv4/route.c > > index da427a4a33fe..80f7c5b7b832 100644 > > --- a/net/ipv4/route.c > > +++ b/net/ipv4/route.c > > @@ -1712,6 +1712,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr, > > goto martian_source; > > > > res.fi = NULL; > > + res.table = NULL; > > if (ipv4_is_lbcast(daddr) || (saddr == 0 && daddr == 0)) > > goto brd_input; > > > > @@ -1834,6 +1835,7 @@ out: return err; > > RT_CACHE_STAT_INC(in_no_route); > > res.type = RTN_UNREACHABLE; > > res.fi = NULL; > > + res.table = NULL; > > goto local_input; > > > > /* > > I was seeing the same oops as Fabio (except that the faulting address > was 0xb instead of 0x7) and after applying this patch I no longer see > it: > > Tested-by: Thierry Reding I've been hitting this as well. An oops on boot in ip_route_input_slow(), here: #ifdef CONFIG_IP_ROUTE_CLASSID rth->dst.tclassid = itag; #endif rth->rt_is_input = 1; if (res.table) -->> rth->rt_table_id = res.table->tb_id; RT_CACHE_STAT_INC(in_slow_tot); I did this, which made it go away: --- a/net/ipv4/route.c~a +++ a/net/ipv4/route.c @@ -1692,6 +1692,8 @@ static int ip_route_input_slow(struct sk struct net *net = dev_net(dev); bool do_cache; + res.table = 0; + /* IP on this device is disabled. */ if (!in_dev)