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 /include | |
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 'include')
-rw-r--r-- | include/linux/ipv6.h | 3 | ||||
-rw-r--r-- | include/net/inet_sock.h | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 10f521a6a9c8..09253825c99c 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h @@ -243,8 +243,7 @@ struct ipv6_pinfo { } rxopt; /* sockopt flags */ - __u8 sndflow:1, - srcprefs:3; /* 001: prefer temporary address + __u8 srcprefs:3; /* 001: prefer temporary address * 010: prefer public address * 100: prefer care-of address */ diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index befee0f66c05..98e11958cdff 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h @@ -277,6 +277,7 @@ enum { INET_FLAGS_RECVERR6 = 26, INET_FLAGS_REPFLOW = 27, INET_FLAGS_RTALERT_ISOLATE = 28, + INET_FLAGS_SNDFLOW = 29, }; /* cmsg flags for inet */ |