syzbot


KCSAN: data-race in copy_mm / percpu_counter_destroy_many

Status: upstream: reported on 2025/05/12 06:36
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+8be9bf36c3cf574426c8@syzkaller.appspotmail.com
First crash: 5d21h, last: 5d21h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [io-uring] KCSAN: data-race in copy_mm / percpu_counter_destroy_many 2 (3) 2025/05/12 17:08

Sample crash report:
==================================================================
BUG: KCSAN: data-race in copy_mm / percpu_counter_destroy_many

write to 0xffff8881045e19d8 of 8 bytes by task 2123 on cpu 0:
 __list_del include/linux/list.h:195 [inline]
 __list_del_entry include/linux/list.h:218 [inline]
 list_del include/linux/list.h:229 [inline]
 percpu_counter_destroy_many+0xc7/0x2b0 lib/percpu_counter.c:244
 __mmdrop+0x22e/0x350 kernel/fork.c:947
 mmdrop include/linux/sched/mm.h:55 [inline]
 io_ring_ctx_free+0x31e/0x360 io_uring/io_uring.c:2740
 io_ring_exit_work+0x529/0x560 io_uring/io_uring.c:2962
 process_one_work kernel/workqueue.c:3238 [inline]
 process_scheduled_works+0x4cb/0x9d0 kernel/workqueue.c:3319
 worker_thread+0x582/0x770 kernel/workqueue.c:3400
 kthread+0x486/0x510 kernel/kthread.c:464
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:153
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245

read to 0xffff8881045e1600 of 1344 bytes by task 5051 on cpu 1:
 dup_mm kernel/fork.c:1728 [inline]
 copy_mm+0xfb/0x1310 kernel/fork.c:1786
 copy_process+0xcf1/0x1f90 kernel/fork.c:2429
 kernel_clone+0x16c/0x5b0 kernel/fork.c:2844
 __do_sys_clone kernel/fork.c:2987 [inline]
 __se_sys_clone kernel/fork.c:2971 [inline]
 __x64_sys_clone+0xe6/0x120 kernel/fork.c:2971
 x64_sys_call+0x2c59/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:57
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd0/0x1a0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 5051 Comm: syz.1.494 Not tainted 6.15.0-rc5-syzkaller-00300-g3ce9925823c7 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/19/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/05/11 09:17 upstream 3ce9925823c7 77908e5f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in copy_mm / percpu_counter_destroy_many
* Struck through repros no longer work on HEAD.