diff options
author | Eric Dumazet <edumazet@google.com> | 2024-08-27 03:52:49 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-08-29 02:08:16 +0200 |
commit | 3e5cbbb1fb9a64588a2c6ddc5e432a303d36a488 (patch) | |
tree | 8efed836d67b210fa4edf00c60f494fb8380d4b8 /net/ipv6 | |
parent | net/xen-netback: prevent UAF in xenvif_flush_hash() (diff) | |
download | linux-3e5cbbb1fb9a64588a2c6ddc5e432a303d36a488.tar.xz linux-3e5cbbb1fb9a64588a2c6ddc5e432a303d36a488.zip |
tcp: remove volatile qualifier on tw_substate
Using a volatile qualifier for a specific struct field is unusual.
Use instead READ_ONCE()/WRITE_ONCE() where necessary.
tcp_timewait_state_process() can change tw_substate while other
threads are reading this field.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Link: https://patch.msgid.link/20240827015250.3509197-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 200fea92f12f..fb2e64ce660f 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -2258,7 +2258,7 @@ static void get_timewait6_sock(struct seq_file *seq, src->s6_addr32[2], src->s6_addr32[3], srcp, dest->s6_addr32[0], dest->s6_addr32[1], dest->s6_addr32[2], dest->s6_addr32[3], destp, - tw->tw_substate, 0, 0, + READ_ONCE(tw->tw_substate), 0, 0, 3, jiffies_delta_to_clock_t(delta), 0, 0, 0, 0, refcount_read(&tw->tw_refcnt), tw); } |