summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-12-08 13:12:43 +0300
committerDavid S. Miller <davem@davemloft.net>2023-12-11 13:59:17 +0300
commitd2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc (patch)
tree672849531d60dae088df5508f6183ea01231b6ae /net/rds
parent9a64d4c93eee6b2efb7a02ec98d9480946424509 (diff)
downloadlinux-d2f011a0bf28c090ad75c9b1d306f2e1dda1c9bc.tar.xz
ipv6: annotate data-races around np->mcast_oif
np->mcast_oif is read locklessly in some contexts. Make all accesses to this field lockless, adding appropriate annotations. This also makes setsockopt( IPV6_MULTICAST_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>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/tcp_listen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
index 53b3535a1e4a..05008ce5c421 100644
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -165,7 +165,7 @@ int rds_tcp_accept_one(struct socket *sock)
struct ipv6_pinfo *inet6;
inet6 = inet6_sk(new_sock->sk);
- dev_if = inet6->mcast_oif;
+ dev_if = READ_ONCE(inet6->mcast_oif);
} else {
dev_if = new_sock->sk->sk_bound_dev_if;
}