[moderation] [io-uring?] KCSAN: data-race in __flush_work / __flush_work

0 views
Skip to first unread message

syzbot

unread,
Jun 14, 2024, 4:38:23 AM (12 days ago) Jun 14
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: d20f6b3d747c Merge tag 'net-6.10-rc4' of git://git.kernel...
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=16658ada980000
kernel config: https://syzkaller.appspot.com/x/.config?x=68336ea4b6f4fc09
dashboard link: https://syzkaller.appspot.com/bug?extid=a01f9ad56c5313abfa64
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/3c087c857797/disk-d20f6b3d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/1e1bdb2e1bb3/vmlinux-d20f6b3d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/45de6c2a785e/bzImage-d20f6b3d.xz

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

==================================================================
BUG: KCSAN: data-race in __flush_work / __flush_work

write to 0xffff88812911c3f0 of 8 bytes by task 26688 on cpu 0:
instrument_write include/linux/instrumented.h:41 [inline]
___set_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 [inline]
insert_wq_barrier kernel/workqueue.c:3793 [inline]
start_flush_work kernel/workqueue.c:4145 [inline]
__flush_work+0x30b/0x570 kernel/workqueue.c:4181
flush_work kernel/workqueue.c:4232 [inline]
flush_delayed_work+0x66/0x70 kernel/workqueue.c:4254
io_fallback_tw+0x24b/0x320 io_uring/io_uring.c:1136
tctx_task_work_run+0xd1/0x1b0 io_uring/io_uring.c:1148
tctx_task_work+0x40/0x80 io_uring/io_uring.c:1173
task_work_run+0x13a/0x1a0 kernel/task_work.c:180
exit_task_work include/linux/task_work.h:38 [inline]
do_exit+0x5d5/0x1710 kernel/exit.c:874
do_group_exit+0x102/0x150 kernel/exit.c:1023
get_signal+0xf2f/0x1080 kernel/signal.c:2909
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+0xd6/0x1c0 arch/x86/entry/common.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f

read to 0xffff88812911c3f0 of 8 bytes by task 26365 on cpu 1:
__flush_work+0x42a/0x570 kernel/workqueue.c:4191
flush_work kernel/workqueue.c:4232 [inline]
flush_delayed_work+0x66/0x70 kernel/workqueue.c:4254
io_uring_try_cancel_requests+0x35b/0x370 io_uring/io_uring.c:3037
io_ring_exit_work+0x148/0x500 io_uring/io_uring.c:2816
process_one_work kernel/workqueue.c:3231 [inline]
process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
worker_thread+0x526/0x730 kernel/workqueue.c:3393
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

value changed: 0x0000000000400000 -> 0xffff88810006c005

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 26365 Comm: kworker/u8:16 Tainted: G W 6.10.0-rc3-syzkaller-00099-gd20f6b3d747c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024
Workqueue: iou_exit io_ring_exit_work
==================================================================


---
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