projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ded139b
)
ipv6: annotate date-race in ipv6_can_nonlocal_bind()
author
Eric Dumazet
<edumazet@google.com>
Thu, 15 Jan 2026 09:41:36 +0000
(09:41 +0000)
committer
Jakub Kicinski
<kuba@kernel.org>
Mon, 19 Jan 2026 17:56:42 +0000
(09:56 -0800)
Add a missing READ_ONCE(), and add const qualifiers to the two parameters.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link:
https://patch.msgid.link/20260115094141.3124990-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/ipv6.h
patch
|
blob
|
history
diff --git
a/include/net/ipv6.h
b/include/net/ipv6.h
index
7873b34
..
f39cd85
100644
(file)
--- a/
include/net/ipv6.h
+++ b/
include/net/ipv6.h
@@
-931,10
+931,10
@@
static inline void iph_to_flow_copy_v6addrs(struct flow_keys *flow,
#if IS_ENABLED(CONFIG_IPV6)
-static inline bool ipv6_can_nonlocal_bind(struct net *net,
- struct inet_sock *inet)
+static inline bool ipv6_can_nonlocal_bind(
const
struct net *net,
+
const
struct inet_sock *inet)
{
- return
net->ipv6.sysctl.ip_nonlocal_bind
||
+ return
READ_ONCE(net->ipv6.sysctl.ip_nonlocal_bind)
||
test_bit(INET_FLAGS_FREEBIND, &inet->inet_flags) ||
test_bit(INET_FLAGS_TRANSPARENT, &inet->inet_flags);
}