tcp: remove volatile qualifier on tw_substate
authorEric Dumazet <edumazet@google.com>
Tue, 27 Aug 2024 01:52:49 +0000 (01:52 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Aug 2024 00:08:16 +0000 (17:08 -0700)
commit3e5cbbb1fb9a64588a2c6ddc5e432a303d36a488
tree8efed836d67b210fa4edf00c60f494fb8380d4b8
parent0fa5e94a1811d68fbffa0725efe6d4ca62c03d12
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>
include/net/inet_timewait_sock.h
net/ipv4/inet_diag.c
net/ipv4/tcp_ipv4.c
net/ipv4/tcp_minisocks.c
net/ipv6/tcp_ipv6.c