[moderation] [io-uring?] KCSAN: data-race in __io_queue_proc / io_poll_wake (2)

0 views
Skip to first unread message

syzbot

unread,
Apr 2, 2024, 2:34:30 AMApr 2
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 026e680b0a08 Merge tag 'pwm/for-6.9-rc3-fixes' of git://gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1719c30d180000
kernel config: https://syzkaller.appspot.com/x/.config?x=d024e89f7bb376ce
dashboard link: https://syzkaller.appspot.com/bug?extid=00aeaa2770a22e54d43e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [asml.s...@gmail.com ax...@kernel.dk io-u...@vger.kernel.org linux-...@vger.kernel.org]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/eb276a281ef9/disk-026e680b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/e25825b48b7a/vmlinux-026e680b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/376093368942/bzImage-026e680b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+00aeaa...@syzkaller.appspotmail.com

==================================================================
BUG: KCSAN: data-race in __io_queue_proc / io_poll_wake

write to 0xffff888115f99b48 of 8 bytes by task 49 on cpu 0:
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 0xffff888115f99b48 of 8 bytes by task 14174 on cpu 1:
__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_handle_tw_list+0x1ef/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
resume_user_mode_work include/linux/resume_user_mode.h:50 [inline]
exit_to_user_mode_loop kernel/entry/common.c:114 [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+0xbe/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: 0xffff888117941208 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14174 Comm: syz-executor.0 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
==================================================================


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup
Reply all
Reply to author
Forward
0 new messages