syzbot


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

Status: moderation: reported on 2025/05/23 01:52
Subsystems: io-uring
[Documentation on labels]
Reported-by: syzbot+638b9d32d0daeb73cdb0@syzkaller.appspotmail.com
First crash: 48d, last: 2d00h
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake (2) io-uring 6 2 464d 464d 0/29 auto-obsoleted due to no activity on 2024/05/07 13:03
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake (3) io-uring 6 2 281d 281d 0/29 auto-obsoleted due to no activity on 2024/11/05 15:29
upstream KCSAN: data-race in __io_queue_proc / io_poll_wake io-uring 6 1 623d 623d 0/29 auto-obsoleted due to no activity on 2023/11/30 07:15

Sample crash report:
EXT4-fs error (device loop5): ext4_free_branches:1023: inode #11: comm syz.5.513: invalid indirect mapped block 3 (level 2)
EXT4-fs (loop5): 2 truncates cleaned up
==================================================================
BUG: KCSAN: data-race in __io_queue_proc / io_poll_wake

write to 0xffff8881197ffde8 of 8 bytes by task 5330 on cpu 1:
 io_poll_wake+0x1f9/0x3b0 io_uring/poll.c:420
 __wake_up_common kernel/sched/wait.c:89 [inline]
 __wake_up_common_lock kernel/sched/wait.c:106 [inline]
 __wake_up+0x63/0xb0 kernel/sched/wait.c:127
 tty_ldisc_hangup+0x18b/0x370 drivers/tty/tty_ldisc.c:710
 __tty_hangup+0x395/0x510 drivers/tty/tty_io.c:621
 tty_vhangup+0x17/0x20 drivers/tty/tty_io.c:691
 pty_close+0x266/0x290 drivers/tty/pty.c:79
 tty_release+0x1ff/0xb10 drivers/tty/tty_io.c:1745
 __fput+0x29b/0x650 fs/file_table.c:465
 ____fput+0x1c/0x30 fs/file_table.c:493
 task_work_run+0x12e/0x1a0 kernel/task_work.c:227
 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
 exit_to_user_mode_loop+0xe4/0x100 kernel/entry/common.c:114
 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff8881197ffde8 of 8 bytes by task 5333 on cpu 0:
 __io_queue_proc+0x10a/0x280 io_uring/poll.c:473
 io_async_queue_proc+0x43/0x50 io_uring/poll.c:636
 poll_wait include/linux/poll.h:45 [inline]
 n_tty_poll+0x77/0x450 drivers/tty/n_tty.c:2451
 tty_poll+0x79/0xf0 drivers/tty/tty_io.c:2199
 vfs_poll include/linux/poll.h:82 [inline]
 __io_arm_poll_handler+0x1eb/0xb70 io_uring/poll.c:583
 io_arm_poll_handler+0x427/0x590 io_uring/poll.c:708
 io_queue_async+0x60/0x3a0 io_uring/io_uring.c:1950
 io_queue_sqe io_uring/io_uring.c:1976 [inline]
 io_req_task_submit+0xbb/0xc0 io_uring/io_uring.c:1380
 io_poll_task_func+0x674/0x9e0 io_uring/poll.c:-1
 io_handle_tw_list+0xcc/0x1c0 io_uring/io_uring.c:1067
 tctx_task_work_run+0x6d/0x1a0 io_uring/io_uring.c:1132
 tctx_task_work+0x3f/0x80 io_uring/io_uring.c:1150
 task_work_run+0x12e/0x1a0 kernel/task_work.c:227
 get_signal+0xe13/0xf70 kernel/signal.c:2807
 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop+0x7a/0x100 kernel/entry/common.c:111
 exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
 do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0xffff8881045eba08 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 5333 Comm: syz.5.513 Not tainted 6.16.0-rc5-syzkaller #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/07/08 13:17 upstream d7b8f8e20813 4f67c4ae .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __io_queue_proc / io_poll_wake
2025/05/23 01:52 upstream 94305e83eccb fa44301a .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.