syzbot


KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread (2)

Status: auto-closed as invalid on 2020/11/28 16:26
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 664d, last: 664d
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 1 725d 725d 0/23 auto-closed as invalid on 2020/09/27 21:07
upstream KCSAN: data-race in __percpu_ref_switch_mode / io_sq_thread (3) 1 626d 620d 0/23 auto-closed as invalid on 2021/01/05 07:10

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

write to 0xffff88810ab16000 of 8 bytes by task 24866 on cpu 1:
 __percpu_ref_switch_to_atomic lib/percpu-refcount.c:216 [inline]
 __percpu_ref_switch_mode+0x19a/0x390 lib/percpu-refcount.c:273
 percpu_ref_kill_and_confirm+0x84/0x190 lib/percpu-refcount.c:387
 percpu_ref_kill include/linux/percpu-refcount.h:149 [inline]
 io_ring_ctx_wait_and_kill+0x31/0x370 fs/io_uring.c:8358
 io_uring_create+0x14e0/0x1e20 fs/io_uring.c:9322
 io_uring_setup fs/io_uring.c:9349 [inline]
 __do_sys_io_uring_setup fs/io_uring.c:9355 [inline]
 __se_sys_io_uring_setup fs/io_uring.c:9352 [inline]
 __x64_sys_io_uring_setup+0xe1/0x120 fs/io_uring.c:9352
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88810ab16000 of 8 bytes by task 24867 on cpu 0:
 percpu_ref_is_dying include/linux/percpu-refcount.h:352 [inline]
 __io_sq_thread fs/io_uring.c:6688 [inline]
 io_sq_thread+0x4ef/0xc80 fs/io_uring.c:6781
 kthread+0x1fa/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24867 Comm: io_uring-sq Not tainted 5.9.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 24867 Comm: io_uring-sq Not tainted 5.9.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x116/0x15d lib/dump_stack.c:118
 panic+0x1e7/0x5fa kernel/panic.c:231
 kcsan_report+0x67b/0x680 kernel/kcsan/report.c:634
 kcsan_setup_watchpoint+0x46a/0x4d0 kernel/kcsan/core.c:568
 percpu_ref_is_dying include/linux/percpu-refcount.h:352 [inline]
 __io_sq_thread fs/io_uring.c:6688 [inline]
 io_sq_thread+0x4ef/0xc80 fs/io_uring.c:6781
 kthread+0x1fa/0x220 kernel/kthread.c:292
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:296
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2020/10/24 16:23 upstream f11901ed723d a1839e81 .config log report info