syzbot


KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread

Status: auto-closed as invalid on 2020/09/27 21:07
Subsystems: fs
[Documentation on labels]
First crash: 1339d, last: 1339d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread (3) fs 1 1240d 1234d 0/26 auto-closed as invalid on 2021/01/05 07:10
upstream KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread (2) fs 1 1278d 1278d 0/26 auto-closed as invalid on 2020/11/28 16:26

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread

write to 0xffff88809130f008 of 8 bytes by task 2124 on cpu 1:
 __percpu_ref_switch_to_atomic lib/percpu-refcount.c:183 [inline]
 __percpu_ref_switch_mode+0x19f/0x360 lib/percpu-refcount.c:237
 percpu_ref_kill_and_confirm+0x8a/0x170 lib/percpu-refcount.c:350
 percpu_ref_kill include/linux/percpu-refcount.h:136 [inline]
 io_ring_ctx_wait_and_kill+0x2f/0x550 fs/io_uring.c:7936
 io_uring_release+0x3e/0x50 fs/io_uring.c:7974
 __fput+0x246/0x4d0 fs/file_table.c:281
 ____fput+0x11/0x20 fs/file_table.c:314
 task_work_run+0x8e/0x110 kernel/task_work.c:141
 exit_task_work include/linux/task_work.h:25 [inline]
 do_exit+0x6d4/0x16c0 kernel/exit.c:806
 do_group_exit+0xcb/0x180 kernel/exit.c:903
 get_signal+0xe9f/0x1650 kernel/signal.c:2757
 arch_do_signal+0x25/0x270 arch/x86/kernel/signal.c:811
 exit_to_user_mode_loop kernel/entry/common.c:136 [inline]
 exit_to_user_mode_prepare+0x124/0x210 kernel/entry/common.c:167
 syscall_exit_to_user_mode+0x16/0x30 kernel/entry/common.c:242
 do_syscall_64+0x45/0x80 arch/x86/entry/common.c:56
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88809130f008 of 8 bytes by task 2129 on cpu 0:
 percpu_ref_is_dying include/linux/percpu-refcount.h:339 [inline]
 io_sq_thread+0x410/0x880 fs/io_uring.c:6552
 kthread+0x20d/0x230 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 2129 Comm: io_uring-sq Not tainted 5.9.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/08/23 21:04 upstream cb95712138ec a6d5f3ad .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.