Skip to content

Commit 74c4b65

Browse files
Nikita V. Shirokovdavem330
authored andcommitted
adding missing rcu_read_unlock in ipxip6_rcv
commit 8d79266 ("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) Fixes: 8d79266 ("ip6_tunnel: add collect_md mode to IPv6 tunnels") Signed-off-by: Nikita V. Shirokov <tehnerd@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent c880949 commit 74c4b65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎net/ipv6/ip6_tunnel.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ static int ipxip6_rcv(struct sk_buff *skb, u8 ipproto,
904904
if (t->parms.collect_md) {
905905
tun_dst = ipv6_tun_rx_dst(skb, 0, 0, 0);
906906
if (!tun_dst)
907-
return 0;
907+
goto drop;
908908
}
909909
ret = __ip6_tnl_rcv(t, skb, tpi, tun_dst, dscp_ecn_decapsulate,
910910
log_ecn_error);

0 commit comments

Comments
 (0)