mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
ipv6: annotate data-races around np->ucast_oif
np->ucast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_UNICAST_IF ) lockless. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
d2f011a0bf
commit
1ac13efd61
@@ -878,7 +878,7 @@ static int rawv6_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
|
||||
if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr))
|
||||
fl6.flowi6_oif = READ_ONCE(np->mcast_oif);
|
||||
else if (!fl6.flowi6_oif)
|
||||
fl6.flowi6_oif = np->ucast_oif;
|
||||
fl6.flowi6_oif = READ_ONCE(np->ucast_oif);
|
||||
security_sk_classify_flow(sk, flowi6_to_flowi_common(&fl6));
|
||||
|
||||
if (hdrincl)
|
||||
|
||||
Reference in New Issue
Block a user