diff options
author | Eric Dumazet <edumazet@google.com> | 2021-10-25 09:48:21 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-25 18:02:13 -0700 |
commit | cc17c3c8e8b5beb4072c0e8e53aeb77bcf4517c2 (patch) | |
tree | c1be2b50cfd23023f0158aa0047192a8f42dc236 /net/ipv6/ipv6_sockglue.c | |
parent | 09b898466792b0c387040e6df90a16e7a9f2a5d9 (diff) | |
download | lwn-cc17c3c8e8b5beb4072c0e8e53aeb77bcf4517c2.tar.gz lwn-cc17c3c8e8b5beb4072c0e8e53aeb77bcf4517c2.zip |
ipv6: annotate data races around np->min_hopcount
No report yet from KCSAN, yet worth documenting the races.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Soheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index e4bdb09c5586..9c3d28764b5c 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -950,7 +950,10 @@ done: goto e_inval; if (val < 0 || val > 255) goto e_inval; - np->min_hopcount = val; + /* tcp_v6_err() and tcp_v6_rcv() might read min_hopcount + * while we are changing it. + */ + WRITE_ONCE(np->min_hopcount, val); retv = 0; break; case IPV6_DONTFRAG: |