Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv6: Fix unbalanced rcu locking in rt6_update_exception_stamp_rt

The nexthop path in rt6_update_exception_stamp_rt needs to call
rcu_read_unlock if it fails to find a fib6_nh match rather than
just returning.

Fixes: e659ba31d806 ("ipv6: Handle all fib6_nh in a nexthop in exception handling")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Ahern and committed by
David S. Miller
cff6a327 cd114d2e

+1 -1
+1 -1
net/ipv6/route.c
··· 1951 1951 nexthop_for_each_fib6_nh(from->nh, fib6_nh_find_match, &arg); 1952 1952 1953 1953 if (!arg.match) 1954 - return; 1954 + goto unlock; 1955 1955 fib6_nh = arg.match; 1956 1956 } else { 1957 1957 fib6_nh = from->fib6_nh;