summaryrefslogtreecommitdiff
path: root/include/linux/ipv6.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2023-09-18 14:23:21 +0000
committerPaolo Abeni <pabeni@redhat.com>2023-09-19 18:21:44 +0200
commitfa17a6d8a5bd0cd7565b613cb804242cd0f6b7ab (patch)
tree47b212f49ee830235b382165cf734328cdff2e00 /include/linux/ipv6.h
parent6a23c555f7eb436d6799533675ffa179db3d5834 (diff)
ipv6: lockless IPV6_ADDR_PREFERENCES implementation
We have data-races while reading np->srcprefs Switch the field to a plain byte, add READ_ONCE() and WRITE_ONCE() annotations where needed, and IPV6_ADDR_PREFERENCES setsockopt() can now be lockless. Signed-off-by: Eric Dumazet <edumazet@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20230918142321.1794107-1-edumazet@google.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r--include/linux/ipv6.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 09253825c99c..e400ff757f13 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -243,7 +243,7 @@ struct ipv6_pinfo {
} rxopt;
/* sockopt flags */
- __u8 srcprefs:3; /* 001: prefer temporary address
+ __u8 srcprefs; /* 001: prefer temporary address
* 010: prefer public address
* 100: prefer care-of address
*/