Netdev List
 help / color / mirror / Atom feed
From: dormando <dormando@rydia.net>
To: Alexei Starovoitov <alexei.starovoitov@gmail.com>
Cc: roy.qing.li@gmail.com, Eric Dumazet <eric.dumazet@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
Date: Thu, 22 May 2014 11:13:42 -0700 (PDT)	[thread overview]
Message-ID: <alpine.DEB.2.02.1405221111190.8647@dtop> (raw)
In-Reply-To: <CAADnVQ+bvNGhrEqC3P3DqApjcXM3OUUHqTWJ+iwVmC3f4PguEw@mail.gmail.com>



On Thu, 22 May 2014, Alexei Starovoitov wrote:

> On Thu, May 22, 2014 at 1:36 AM,  <roy.qing.li@gmail.com> wrote:
> > From: Li RongQing <roy.qing.li@gmail.com>
> >
> > the value of itag is a random value from stack, and may not be initiated by
> > fib_validate_source, which called fib_combine_itag if CONFIG_IP_ROUTE_CLASSID
> > is not set
> >
> > This will make the cached dst uncertainty
> >
> > Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
>
> Nice catch. Indeed. I think it's needed for stable.
>
> Acked-by: Alexei Starovoitov <ast@plumgrid.com>
>
> Dormando,
> can you check whether your config has CONFIG_IP_ROUTE_CLASSID or not?
> The way I'm reading the code, it shouldn't be causing your failures,
> but that part
> of code is hairy..

CONFIG_IP_ROUTE_CLASSID=y

There're a lot of negatives in that description, but if this patch only
affects you if CONFIG_IP_ROUTE_CLASSID=n?

> > ---
> >  net/ipv4/route.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/ipv4/route.c b/net/ipv4/route.c
> > index 50e1e0f..4154eb7 100644
> > --- a/net/ipv4/route.c
> > +++ b/net/ipv4/route.c
> > @@ -1526,7 +1526,7 @@ static int __mkroute_input(struct sk_buff *skb,
> >         struct in_device *out_dev;
> >         unsigned int flags = 0;
> >         bool do_cache;
> > -       u32 itag;
> > +       u32 itag = 0;
> >
> >         /* get a working reference to the output device */
> >         out_dev = __in_dev_get_rcu(FIB_RES_DEV(*res));
> > --
> > 1.7.10.4
> >
> > --
> > 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
>

  reply	other threads:[~2014-05-22 18:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-22  8:36 [PATCH] ipv4: initialise the itag variable in __mkroute_input roy.qing.li
2014-05-22 16:03 ` Alexei Starovoitov
2014-05-22 18:13   ` dormando [this message]
2014-05-22 18:21     ` Eric Dumazet
2014-05-22 19:01       ` dormando
2014-05-22 19:57 ` 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=alpine.DEB.2.02.1405221111190.8647@dtop \
    --to=dormando@rydia.net \
    --cc=alexei.starovoitov@gmail.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=roy.qing.li@gmail.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