* [PATCH] ipv4: initialise the itag variable in __mkroute_input
@ 2014-05-22 8:36 roy.qing.li
2014-05-22 16:03 ` Alexei Starovoitov
2014-05-22 19:57 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: roy.qing.li @ 2014-05-22 8:36 UTC (permalink / raw)
To: netdev
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>
---
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
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
2014-05-22 19:57 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Alexei Starovoitov @ 2014-05-22 16:03 UTC (permalink / raw)
To: roy.qing.li, Eric Dumazet, dormando, David S. Miller
Cc: netdev@vger.kernel.org
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..
> ---
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
2014-05-22 16:03 ` Alexei Starovoitov
@ 2014-05-22 18:13 ` dormando
2014-05-22 18:21 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: dormando @ 2014-05-22 18:13 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: roy.qing.li, Eric Dumazet, David S. Miller,
netdev@vger.kernel.org
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
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
2014-05-22 18:13 ` dormando
@ 2014-05-22 18:21 ` Eric Dumazet
2014-05-22 19:01 ` dormando
0 siblings, 1 reply; 6+ messages in thread
From: Eric Dumazet @ 2014-05-22 18:21 UTC (permalink / raw)
To: dormando
Cc: Alexei Starovoitov, roy.qing.li, David S. Miller,
netdev@vger.kernel.org
On Thu, 2014-05-22 at 11:13 -0700, dormando wrote:
> 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?
Yep
Have you tried Linus fix for pipes ?
(commit b0d8d2292160bb63de1972361ebed100c64b5b37 )
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
2014-05-22 18:21 ` Eric Dumazet
@ 2014-05-22 19:01 ` dormando
0 siblings, 0 replies; 6+ messages in thread
From: dormando @ 2014-05-22 19:01 UTC (permalink / raw)
To: Eric Dumazet
Cc: Alexei Starovoitov, roy.qing.li, David S. Miller,
netdev@vger.kernel.org
On Thu, 22 May 2014, Eric Dumazet wrote:
> On Thu, 2014-05-22 at 11:13 -0700, dormando wrote:
>
> > 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?
>
> Yep
>
>
> Have you tried Linus fix for pipes ?
> (commit b0d8d2292160bb63de1972361ebed100c64b5b37 )
>
>
>
Nope. `git describe` says that's a 3.13 change. I saw that 3.14 is getting
the LTS treatment, so I'm going to rebase our patchset and try to get that
in testing.
I don't think the pipe fix would get all of our bugs though, maybe the
kmem one. Which would be nice.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] ipv4: initialise the itag variable in __mkroute_input
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 19:57 ` David Miller
1 sibling, 0 replies; 6+ messages in thread
From: David Miller @ 2014-05-22 19:57 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
From: roy.qing.li@gmail.com
Date: Thu, 22 May 2014 16:36:55 +0800
> 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>
Applied and queued up for -stable, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-05-22 19:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-05-22 18:21 ` Eric Dumazet
2014-05-22 19:01 ` dormando
2014-05-22 19:57 ` David Miller
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).