ipv6: route: enforce RCU protection in ip6_route_check_nh_onlink()
authorPaolo Abeni <pabeni@redhat.com>
Thu, 21 Feb 2019 10:19:42 +0000 (11:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Mar 2019 12:12:40 +0000 (13:12 +0100)
commit2e4b2aeb02091d45f116dbe477deb5c1d7abcea0
tree306adab4ce266ec5ad557f1f970fc2d9995a724a
parent96dd4ef3c0ced87ba48c0047be46a2dac9025456
ipv6: route: enforce RCU protection in ip6_route_check_nh_onlink()

[ Upstream commit bf1dc8bad1d42287164d216d8efb51c5cd381b18 ]

We need a RCU critical section around rt6_info->from deference, and
proper annotation.

Fixes: 4ed591c8ab44 ("net/ipv6: Allow onlink routes to have a device mismatch if it is the default route")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv6/route.c