Eric Dumazet
e14cadfd80
tcp: add annotations around sk->sk_shutdown accesses
...
Now sk->sk_shutdown is no longer a bitfield, we can add
standard READ_ONCE()/WRITE_ONCE() annotations to silence
KCSAN reports like the following:
BUG: KCSAN: data-race in tcp_disconnect / tcp_poll
write to 0xffff88814588582c of 1 bytes by task 3404 on cpu 1:
tcp_disconnect+0x4d6/0xdb0 net/ipv4/tcp.c:3121
__inet_stream_connect+0x5dd/0x6e0 net/ipv4/af_inet.c:715
inet_stream_connect+0x48/0x70 net/ipv4/af_inet.c:727
__sys_connect_file net/socket.c:2001 [inline]
__sys_connect+0x19b/0x1b0 net/socket.c:2018
__do_sys_connect net/socket.c:2028 [inline]
__se_sys_connect net/socket.c:2025 [inline]
__x64_sys_connect+0x41/0x50 net/socket.c:2025
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
read to 0xffff88814588582c of 1 bytes by task 3374 on cpu 0:
tcp_poll+0x2e6/0x7d0 net/ipv4/tcp.c:562
sock_poll+0x253/0x270 net/socket.c:1383
vfs_poll include/linux/poll.h:88 [inline]
io_poll_check_events io_uring/poll.c:281 [inline]
io_poll_task_func+0x15a/0x820 io_uring/poll.c:333
handle_tw_list io_uring/io_uring.c:1184 [inline]
tctx_task_work+0x1fe/0x4d0 io_uring/io_uring.c:1246
task_work_run+0x123/0x160 kernel/task_work.c:179
get_signal+0xe64/0xff0 kernel/signal.c:2635
arch_do_signal_or_restart+0x89/0x2a0 arch/x86/kernel/signal.c:306
exit_to_user_mode_loop+0x6f/0xe0 kernel/entry/common.c:168
exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204
__syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline]
syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297
do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
value changed: 0x03 -> 0x00
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-05-10 10:27:31 +01:00
..
2023-03-22 21:48:59 +01:00
2023-05-10 10:27:31 +01:00
2023-02-13 18:35:15 +08:00
2023-03-15 00:37:32 -07:00
2023-04-04 16:57:10 -07:00
2023-02-01 20:54:27 -08:00
2022-10-20 17:24:59 -07:00
2023-03-23 08:32:52 +00:00
2022-10-19 09:00:53 +02:00
2023-02-13 18:35:15 +08:00
2023-03-16 17:26:31 -07:00
2022-02-17 11:44:20 -08:00
2021-09-28 17:32:56 -07:00
2022-04-30 15:12:58 +01:00
2023-03-21 21:32:18 -07:00
2022-11-22 20:18:20 -08:00
2023-04-12 16:40:39 -07:00
2023-04-12 16:40:39 -07:00
2023-03-16 21:20:32 -07:00
2023-03-16 21:20:32 -07:00
2021-05-17 15:29:35 -07:00
2022-08-25 10:33:21 +02:00
2023-03-31 21:37:06 -07:00
2023-03-17 08:56:37 +00:00
2023-02-20 16:31:49 -08:00
2022-05-12 16:52:18 -07:00
2022-10-31 20:14:27 -07:00
2023-03-29 08:22:52 +01:00
2023-02-15 10:25:21 +00:00
2022-07-08 12:10:33 +01:00
2022-07-15 11:49:55 +01:00
2022-10-31 20:14:27 -07:00
2023-03-21 21:16:26 -07:00
2023-02-01 20:54:27 -08:00
2022-01-29 17:53:07 +00:00
2023-04-26 10:17:46 +02:00
2023-01-25 22:45:00 -08:00
2022-10-03 07:59:06 +01:00
2023-04-13 16:43:38 -07:00
2022-11-16 12:48:44 +00:00
2022-09-29 07:18:00 +02:00
2022-08-04 11:31:20 -07:00
2023-04-12 16:40:39 -07:00
2022-06-24 11:34:38 +01:00
2022-12-25 13:38:09 -08:00
2022-11-16 13:02:04 +00:00
2023-04-12 16:40:39 -07:00
2023-01-23 21:37:25 -08:00
2022-05-16 13:03:29 +02:00
2023-03-21 21:32:18 -07:00
2023-04-04 18:56:58 -07:00
2023-01-26 10:52:18 +01:00
2021-05-17 15:29:35 -07:00
2023-04-06 12:01:20 -07:00
2023-04-06 12:01:20 -07:00
2023-04-21 20:26:56 -07:00
2022-12-12 13:11:24 -08:00
2023-04-07 08:19:11 +01:00
2023-02-02 00:25:14 +01:00
2022-04-06 12:05:41 -07:00
2023-05-10 10:03:32 +01:00
2022-10-16 15:27:07 -07:00
2023-03-22 22:53:00 -07:00
2023-02-02 00:25:14 +01:00
2023-02-02 00:25:14 +01:00
2022-09-20 10:21:49 -07:00
2022-08-17 10:19:22 +01:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2023-05-10 10:27:31 +01:00
2023-04-13 16:04:28 -07:00
2022-04-06 12:05:41 -07:00
2022-08-29 12:47:15 +01:00
2023-03-18 12:23:34 +00:00
2022-04-06 12:05:41 -07:00
2022-10-03 12:38:34 +01:00
2023-03-18 12:23:34 +00:00
2022-12-20 03:13:45 +01:00
2022-04-28 13:02:01 -07:00
2023-03-18 12:23:34 +00:00
2022-04-06 12:05:41 -07:00
2023-03-17 08:25:05 +00:00
2023-01-19 09:26:16 -08:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2022-04-06 12:05:41 -07:00
2023-05-10 10:27:31 +01:00
2021-05-17 15:29:35 -07:00
2023-03-03 17:25:15 +01:00
2022-11-16 09:43:35 +00:00
2022-04-12 15:00:25 +02:00
2022-12-12 09:29:56 +00:00
2022-12-12 09:51:52 +00:00
2022-11-29 08:44:24 -08:00
2023-03-17 08:56:37 +00:00
2022-10-12 17:50:37 -07:00
2023-04-21 20:26:56 -07:00
2022-06-08 10:10:13 -07:00
2022-09-29 07:18:00 +02:00