netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: David Ahern <dsa@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, sergey.senozhatsky.work@gmail.com,
	richard.alpe@ericsson.com, festevam@gmail.com
Subject: Re: [PATCH net-next v2] net: Initialize table in fib result
Date: Thu, 17 Sep 2015 09:00:52 +0900	[thread overview]
Message-ID: <20150917000052.GA421@swordfish> (raw)
In-Reply-To: <1442420199-51715-1-git-send-email-dsa@cumulusnetworks.com>

On (09/16/15 10:16), David Ahern wrote:
[..]
> The root cause is use of res.table uninitialized.
> 
> Thanks to Nikolay for noticing the uninitialized use amongst the maze of
> gotos.
> 
> As Nikolay pointed out the second initialization is not required to fix
> the oops, but rather to fix a related problem where a valid lookup should
> be invalidated before creating the rth entry.
> 
> Fixes: b7503e0cdb5d ("net: Add FIB table id to rtable")
> Reported-by: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>

works for me, thanks

Tested-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

	-ss

> Reported-by: Richard Alpe <richard.alpe@ericsson.com>
> Reported-by: Fabio Estevam <festevam@gmail.com>
> Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
> Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
> ---
> v2:
> - clarification in the commit message regarding the second initialization
> 
>  net/ipv4/route.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> 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;
>  
>  	/*
> -- 
> 2.3.2 (Apple Git-55)
> 

  parent reply	other threads:[~2015-09-17  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 16:16 [PATCH net-next v2] net: Initialize table in fib result David Ahern
2015-09-16 16:19 ` Nikolay Aleksandrov
2015-09-17  7:45   ` Richard Alpe
2015-09-16 23:58 ` Florian Fainelli
2015-09-17  0:00 ` Sergey Senozhatsky [this message]
2015-09-18  4:35 ` 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=20150917000052.GA421@swordfish \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=dsa@cumulusnetworks.com \
    --cc=festevam@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=richard.alpe@ericsson.com \
    /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 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).