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

[ Upstream commit 193f3685d0546b0cea20c99894aadb70098e47bf ]

We must access rt6_info->from under RCU read lock: move the
dereference under such lock, with proper annotation.

v1 -> v2:
 - avoid using multiple, racy, fetch operations for rt->from

Fixes: a68886a69180 ("net/ipv6: Make from in rt6_info rcu protected")
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