From: "Nikita V. Shirokov" <tehnerd@fb.com>
To: netdev <netdev@vger.kernel.org>
Cc: ast@kernel.org, vnuorval@tcs.hut.fi,
"Nikita V. Shirokov" <tehnerd@fb.com>
Subject: [PATCH net v2] adding missing rcu_read_unlock in ipxip6_rcv
Date: Wed, 6 Dec 2017 17:15:43 -0800 [thread overview]
Message-ID: <20171207011543.2877447-1-tehnerd@fb.com> (raw)
commit 8d79266bc48c ("ip6_tunnel: add collect_md mode to IPv6 tunnels")
introduced new exit point in ipxip6_rcv. however rcu_read_unlock is
missing there. this diff is fixing this
v1->v2:
instead of doing rcu_read_unlock in place, we are going to "drop"
section (to prevent skb leakage)
Signed-off-by: Nikita V. Shirokov <tehnerd@fb.com>
---
net/ipv6/ip6_tunnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 3d3092a..db84f52 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -904,7 +904,7 @@ static int ipxip6_rcv(struct sk_buff *skb, u8 ipproto,
if (t->parms.collect_md) {
tun_dst = ipv6_tun_rx_dst(skb, 0, 0, 0);
if (!tun_dst)
- return 0;
+ goto drop;
}
ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate,
log_ecn_error);
--
2.9.5
next reply other threads:[~2017-12-07 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-07 1:15 Nikita V. Shirokov [this message]
2017-12-07 1:54 ` [PATCH net v2] adding missing rcu_read_unlock in ipxip6_rcv Alexei Starovoitov
2017-12-07 19:00 ` 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=20171207011543.2877447-1-tehnerd@fb.com \
--to=tehnerd@fb.com \
--cc=ast@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vnuorval@tcs.hut.fi \
/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