syzbot


KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn (2)

Status: upstream: reported on 2024/08/29 16:53
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+6d392a44667baa45bb5a@syzkaller.appspotmail.com
First crash: 16d, last: 16h23m
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [kernel?] KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn (2) 2 (3) 2024/09/03 22:01
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn kernel 8 59d 91d 0/28 auto-obsoleted due to no activity on 2024/08/21 20:27

Sample crash report:
==================================================================
BUG: KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn

read-write to 0xffffffff88bb27ac of 4 bytes by task 1039 on cpu 1:
 pcpu_update_empty_pages mm/percpu.c:602 [inline]
 pcpu_chunk_populated mm/percpu.c:1531 [inline]
 pcpu_balance_populated mm/percpu.c:2062 [inline]
 pcpu_balance_workfn+0x94e/0xa60 mm/percpu.c:2212
 process_one_work kernel/workqueue.c:3231 [inline]
 process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3312
 worker_thread+0x51d/0x6f0 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

read to 0xffffffff88bb27ac of 4 bytes by task 3270 on cpu 0:
 pcpu_alloc_noprof+0x9a7/0x10c0 mm/percpu.c:1894
 devlink_trap_register net/devlink/trap.c:1284 [inline]
 devl_traps_register+0x2af/0x660 net/devlink/trap.c:1372
 nsim_dev_traps_init+0x1a4/0x2f0 drivers/net/netdevsim/dev.c:903
 nsim_drv_probe+0x4bd/0x7a0 drivers/net/netdevsim/dev.c:1574
 nsim_bus_probe+0x15/0x20 drivers/net/netdevsim/bus.c:391
 really_probe+0x1cf/0x5d0 drivers/base/dd.c:657
 __driver_probe_device+0x12d/0x200 drivers/base/dd.c:799
 driver_probe_device+0x38/0x2f0 drivers/base/dd.c:829
 __device_attach_driver+0x216/0x320 drivers/base/dd.c:957
 bus_for_each_drv+0x1cd/0x240 drivers/base/bus.c:457
 __device_attach+0x1c7/0x290 drivers/base/dd.c:1029
 device_initial_probe+0x1a/0x20 drivers/base/dd.c:1078
 bus_probe_device+0x141/0x1d0 drivers/base/bus.c:532
 device_add+0x5e2/0x790 drivers/base/core.c:3682
 device_register+0x1d/0x30 drivers/base/core.c:3764
 nsim_bus_dev_new drivers/net/netdevsim/bus.c:442 [inline]
 new_device_store+0x27a/0x470 drivers/net/netdevsim/bus.c:173
 bus_attr_store+0x54/0x70 drivers/base/bus.c:170
 sysfs_kf_write+0xae/0xd0 fs/sysfs/file.c:136
 kernfs_fop_write_iter+0x1ce/0x2c0 fs/kernfs/file.c:334
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x78f/0x900 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27dd/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:2
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000001 -> 0x00000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 3270 Comm: syz-executor Not tainted 6.11.0-rc7-syzkaller-00135-gb7718454f937 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================
netdevsim netdevsim2 netdevsim0: renamed from eth0
netdevsim netdevsim2 netdevsim1: renamed from eth1
netdevsim netdevsim2 netdevsim2: renamed from eth2
netdevsim netdevsim2 netdevsim3: renamed from eth3
8021q: adding VLAN 0 to HW filter on device bond0
8021q: adding VLAN 0 to HW filter on device team0
hsr0: Slave A (hsr_slave_0) is not up; please bring it up to get a fully working HSR network
hsr0: Slave B (hsr_slave_1) is not up; please bring it up to get a fully working HSR network
8021q: adding VLAN 0 to HW filter on device batadv0
veth0_vlan: entered promiscuous mode
veth1_vlan: entered promiscuous mode
veth0_macvtap: entered promiscuous mode
veth1_macvtap: entered promiscuous mode
batman_adv: batadv0: Interface activated: batadv_slave_0
batman_adv: batadv0: Interface activated: batadv_slave_1
netdevsim netdevsim2 netdevsim0: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim2 netdevsim1: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim2 netdevsim2: set [1, 0] type 2 family 0 port 6081 - 0
netdevsim netdevsim2 netdevsim3: set [1, 0] type 2 family 0 port 6081 - 0

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/09/14 05:24 upstream b7718454f937 b58f933c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/12 09:37 upstream 77f587896757 60e1a995 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/09/08 17:55 upstream 5dadc1be8fc5 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
2024/08/29 14:14 upstream d5d547aa7b51 9bd464fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc_noprof / pcpu_balance_workfn
* Struck through repros no longer work on HEAD.