syzbot


KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu (4)

Status: auto-closed as invalid on 2022/02/04 19:38
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 379d, last: 341d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu 1 770d 770d 0/24 auto-closed as invalid on 2020/12/02 11:50
upstream KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu (3) 3 435d 452d 0/24 auto-closed as invalid on 2021/11/02 20:29
upstream KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu (2) 8 488d 497d 0/24 auto-closed as invalid on 2021/09/10 01:57

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

write to 0xffff88813ce30b50 of 8 bytes by interrupt on cpu 0:
 percpu_ref_call_confirm_rcu lib/percpu-refcount.c:156 [inline]
 percpu_ref_switch_to_atomic_rcu+0x188/0x360 lib/percpu-refcount.c:205
 rcu_do_batch kernel/rcu/tree.c:2506 [inline]
 rcu_core+0x7f7/0xeb0 kernel/rcu/tree.c:2741
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2754
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:921
 smpboot_thread_fn+0x308/0x4a0 kernel/smpboot.c:164
 kthread+0x2c7/0x2e0 kernel/kthread.c:327
 ret_from_fork+0x1f/0x30

read to 0xffff88813ce30b50 of 8 bytes by task 22813 on cpu 1:
 __percpu_ref_switch_mode+0xd9/0x3a0 lib/percpu-refcount.c:275
 percpu_ref_resurrect+0xcb/0x110 lib/percpu-refcount.c:473
 io_refs_resurrect fs/io_uring.c:1274 [inline]
 io_ctx_quiesce+0xe0/0x212 fs/io_uring.c:10928
 __io_uring_register fs/io_uring.c:10956 [inline]
 __do_sys_io_uring_register+0x37f/0xf2e fs/io_uring.c:11094
 __se_sys_io_uring_register fs/io_uring.c:11074 [inline]
 __x64_sys_io_uring_register+0x4f/0x60 fs/io_uring.c:11074
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffffffff8198b350 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 22813 Comm: syz-executor.1 Not tainted 5.16.0-rc7-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/12/31 19:38 upstream 4f3d93c6eaff 36bd2e48 .config log report info KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu
ci2-upstream-kcsan-gce 2021/12/08 17:47 upstream 2a987e65025e a4a2a501 .config log report info KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu
ci2-upstream-kcsan-gce 2021/12/06 19:28 upstream 0fcfb00b28c0 579a8754 .config log report info KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu
ci2-upstream-kcsan-gce 2021/11/23 15:08 upstream 136057256686 545ab074 .config log report info KCSAN: data-race in __percpu_ref_switch_mode / percpu_ref_switch_to_atomic_rcu
* Struck through repros no longer work on HEAD.