From: Steffen Klassert <steffen.klassert@secunet.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Wei Wang <weiwan@google.com>, Eric Dumazet <edumazet@google.com>,
"Martin KaFai Lau" <kafai@fb.com>, <netdev@vger.kernel.org>
Subject: [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check
Date: Fri, 25 Aug 2017 09:05:42 +0200 [thread overview]
Message-ID: <20170825070542.GV31224@secunet.com> (raw)
rt_cookie might be used uninitialized, fix this by
initializing it.
Fixes: c5cff8561d2d ("ipv6: add rcu grace period before freeing fib6_node")
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
---
net/ipv6/route.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index a9d3564..48c8c92 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1289,7 +1289,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;
--
2.7.4
next reply other threads:[~2017-08-25 7:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-25 7:05 Steffen Klassert [this message]
2017-08-25 7:52 ` [PATCH net] ipv6: Fix may be used uninitialized warning in rt6_check Steffen Klassert
2017-08-25 9:02 ` Stefano Brivio
2017-08-26 0:04 ` David Miller
2017-08-26 0:08 ` 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=20170825070542.GV31224@secunet.com \
--to=steffen.klassert@secunet.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
--cc=weiwan@google.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).