syzbot


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

Status: moderation: reported on 2024/10/01 15:29
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+8efe228a0f715f1e6fcb@syzkaller.appspotmail.com
First crash: 4d02h, last: 4d02h
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake (2) io-uring 2 186d 186d 0/28 auto-obsoleted due to no activity on 2024/05/07 13:03
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake io-uring 1 345d 345d 0/28 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 0xffff888114a016c8 of 8 bytes by task 3977 on cpu 0:
 io_poll_wake+0x1f8/0x3b0 io_uring/poll.c:456
 __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:1657 [inline]
 n_tty_receive_buf_common+0x73f/0xbe0 drivers/tty/n_tty.c:1739
 n_tty_receive_buf2+0x33/0x40 drivers/tty/n_tty.c:1785
 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:3229 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310
 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391
 kthread+0x1d1/0x210 kernel/kthread.c:389
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read to 0xffff888114a016c8 of 8 bytes by task 8133 on cpu 1:
 __io_queue_proc+0xfe/0x260 io_uring/poll.c:509
 io_async_queue_proc+0x43/0x50 io_uring/poll.c:676
 poll_wait include/linux/poll.h:45 [inline]
 n_tty_poll+0x9c/0x490 drivers/tty/n_tty.c:2463
 tty_poll+0x78/0xf0 drivers/tty/tty_io.c:2208
 vfs_poll include/linux/poll.h:84 [inline]
 __io_arm_poll_handler+0x223/0xf20 io_uring/poll.c:623
 io_arm_poll_handler+0x429/0x5e0 io_uring/poll.c:757
 io_queue_async+0x89/0x370 io_uring/io_uring.c:1928
 io_queue_sqe io_uring/io_uring.c:1957 [inline]
 io_req_task_submit+0xb3/0xc0 io_uring/io_uring.c:1370
 io_poll_task_func+0x6eb/0x8a0
 io_handle_tw_list+0xe3/0x200 io_uring/io_uring.c:1060
 tctx_task_work_run+0x6c/0x1b0 io_uring/io_uring.c:1132
 tctx_task_work+0x40/0x80 io_uring/io_uring.c:1150
 task_work_run+0x13a/0x1a0 kernel/task_work.c:228
 get_signal+0xee9/0x1070 kernel/signal.c:2690
 arch_do_signal_or_restart+0x95/0x4b0 arch/x86/kernel/signal.c:337
 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+0xd6/0x1c0 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff888113e47a08 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 8133 Comm: syz.0.1610 Not tainted 6.12.0-rc1-syzkaller-00031-ge32cde8d2bd7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/01 15:28 upstream e32cde8d2bd7 ea2b66a6 .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/10/01 15:28 upstream e32cde8d2bd7 ea2b66a6 .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.