Skip to content

Commit

Permalink
ipv6: Fix may be used uninitialized warning in rt6_check
Browse files Browse the repository at this point in the history
commit 3614364 upstream.

rt_cookie might be used uninitialized, fix this by
initializing it.

Fixes: c5cff85 ("ipv6: add rcu grace period before freeing fib6_node")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Steffen Klassert authored and Greg Kroah-Hartman committed Sep 20, 2017
1 parent ae04a8c commit 7829684
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ static void rt6_dst_from_metrics_check(struct rt6_info *rt)

static struct dst_entry *rt6_check(struct rt6_info *rt, u32 cookie)
{
u32 rt_cookie;
u32 rt_cookie = 0;

if (!rt6_get_cookie_safe(rt, &rt_cookie) || rt_cookie != cookie)
return NULL;
Expand Down

0 comments on commit 7829684

Please sign in to comment.