syzbot


KCSAN: data-race in __io_queue_proc / io_poll_wake (2)

Status: moderation: reported on 2024/04/02 06:34
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+00aeaa2770a22e54d43e@syzkaller.appspotmail.com
First crash: 19d, last: 18d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake io-uring 1 178d 178d 0/26 auto-obsoleted due to no activity on 2023/11/30 07:15

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __io_queue_proc / io_poll_wake

write to 0xffff888117012968 of 8 bytes by task 10 on cpu 1:
 io_poll_wake+0x1f8/0x3b0 io_uring/poll.c:455
 __wake_up_common kernel/sched/wait.c:89 [inline]
 __wake_up_common_lock kernel/sched/wait.c:106 [inline]
 __wake_up+0x65/0xb0 kernel/sched/wait.c:127
 __receive_buf drivers/tty/n_tty.c:1647 [inline]
 n_tty_receive_buf_common+0x72e/0xbd0 drivers/tty/n_tty.c:1729
 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1775
 tty_ldisc_receive_buf+0x63/0x100 drivers/tty/tty_buffer.c:387
 tty_port_default_receive_buf+0x59/0x90 drivers/tty/tty_port.c:37
 receive_buf drivers/tty/tty_buffer.c:445 [inline]
 flush_to_ldisc+0x1ce/0x410 drivers/tty/tty_buffer.c:495
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243

read to 0xffff888117012968 of 8 bytes by task 5498 on cpu 0:
 __io_queue_proc+0xfe/0x260 io_uring/poll.c:508
 io_async_queue_proc+0x43/0x50 io_uring/poll.c:675
 poll_wait include/linux/poll.h:45 [inline]
 n_tty_poll+0x9c/0x490 drivers/tty/n_tty.c:2453
 tty_poll+0x7e/0x100 drivers/tty/tty_io.c:2214
 vfs_poll include/linux/poll.h:84 [inline]
 __io_arm_poll_handler+0x229/0xf30 io_uring/poll.c:622
 io_arm_poll_handler+0x3e6/0x590 io_uring/poll.c:758
 io_queue_async+0x89/0x310 io_uring/io_uring.c:2084
 io_queue_sqe io_uring/io_uring.c:2113 [inline]
 io_req_task_submit+0xff/0x110 io_uring/io_uring.c:1510
 io_poll_task_func+0x760/0x910
 io_handle_tw_list+0x114/0x240 io_uring/io_uring.c:1198
 tctx_task_work_run+0x6c/0x1b0 io_uring/io_uring.c:1270
 tctx_task_work+0x40/0x80 io_uring/io_uring.c:1288
 task_work_run+0x13a/0x1a0 kernel/task_work.c:180
 get_signal+0xeee/0x1080 kernel/signal.c:2683
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:310
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0x59/0x130 kernel/entry/common.c:218
 do_syscall_64+0xe2/0x1d0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x72/0x7a

value changed: 0xffff88811542b608 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5498 Comm: syz-executor.3 Tainted: G        W          6.9.0-rc2-syzkaller-00002-g026e680b0a08 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/02 13:02 upstream 026e680b0a08 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __io_queue_proc / io_poll_wake
2024/04/02 06:34 upstream 026e680b0a08 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __io_queue_proc / io_poll_wake
* Struck through repros no longer work on HEAD.