From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Nikita V. Shirokov" Subject: [PATCH net] adding missing rcu_read_unlock in ipxip6_rcv Date: Wed, 6 Dec 2017 10:19:33 -0800 Message-ID: <20171206181933.1054789-1-tehnerd@fb.com> Cc: ast@kernel.org, vnuorval@tcs.hut.fi, "Nikita V. Shirokov" To: netdev Return-path: Received: from intmgw144178.mxout.facebook.com ([66.220.144.178]:41603 "EHLO mx-out.facebook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751941AbdLFShx (ORCPT ); Wed, 6 Dec 2017 13:37:53 -0500 Sender: netdev-owner@vger.kernel.org List-ID: 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 Signed-off-by: Nikita V. Shirokov --- net/ipv6/ip6_tunnel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 3d3092a..00f2c79 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -903,8 +903,10 @@ static int ipxip6_rcv(struct sk_buff *skb, u8 ipproto, goto drop; if (t->parms.collect_md) { tun_dst = ipv6_tun_rx_dst(skb, 0, 0, 0); - if (!tun_dst) + if (!tun_dst) { + rcu_read_unlock(); return 0; + } } ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate, log_ecn_error); -- 2.9.5