diff options
author | Eric Dumazet <edumazet@google.com> | 2023-09-12 18:02:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-09-15 11:33:48 +0200 |
commit | 859f8b265fc2a11af0fb0c52b4087e0409250592 (patch) | |
tree | 7096c954f2073480a2cb52ef4e443bac1b336679 /net/dccp | |
parent | ipv6: lockless IPV6_MTU_DISCOVER implementation (diff) | |
download | linux-859f8b265fc2a11af0fb0c52b4087e0409250592.tar.xz linux-859f8b265fc2a11af0fb0c52b4087e0409250592.zip |
ipv6: lockless IPV6_FLOWINFO_SEND implementation
np->sndflow reads are racy.
Use one bit ftom atomic inet->inet_flags instead,
IPV6_FLOWINFO_SEND setsockopt() can be 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/dccp')
-rw-r--r-- | net/dccp/ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index d7e63eea705d..4803f0614848 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -844,7 +844,7 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, memset(&fl6, 0, sizeof(fl6)); - if (np->sndflow) { + if (inet6_test_bit(SNDFLOW, sk)) { fl6.flowlabel = usin->sin6_flowinfo & IPV6_FLOWINFO_MASK; IP6_ECN_flow_init(fl6.flowlabel); if (fl6.flowlabel & IPV6_FLOWLABEL_MASK) { |