syzbot


KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (9)

Status: auto-obsoleted due to no activity on 2024/03/23 07:08
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+7edf073787e0af52dd06@syzkaller.appspotmail.com
First crash: 275d, last: 234d
Similar bugs (8)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (5) bpf net 21 528d 782d 0/28 auto-obsoleted due to no activity on 2023/06/02 17:22
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn net 4 1561d 1571d 0/28 auto-closed as invalid on 2020/08/04 06:35
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (2) net 3 1475d 1510d 0/28 auto-closed as invalid on 2020/10/28 20:02
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (4) bpf 12 857d 1028d 0/28 auto-closed as invalid on 2022/07/08 11:31
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (3) bpf 12 1281d 1378d 0/28 auto-closed as invalid on 2021/05/17 09:01
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (6) net 7 448d 463d 0/28 auto-obsoleted due to no activity on 2023/08/21 13:19
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (8) kernel 6 316d 303d 0/28 auto-obsoleted due to no activity on 2023/12/31 20:24
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (7) kernel 1 376d 376d 0/28 auto-obsoleted due to no activity on 2023/11/01 12:19

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

read-write to 0xffffffff8712631c of 4 bytes by task 3175 on cpu 0:
 pcpu_update_empty_pages mm/percpu.c:602 [inline]
 pcpu_chunk_populated mm/percpu.c:1531 [inline]
 pcpu_balance_populated mm/percpu.c:2088 [inline]
 pcpu_balance_workfn+0x94e/0xa50 mm/percpu.c:2238
 process_one_work kernel/workqueue.c:2633 [inline]
 process_scheduled_works+0x5b8/0xa40 kernel/workqueue.c:2706
 worker_thread+0x525/0x730 kernel/workqueue.c:2787
 kthread+0x1d7/0x210 kernel/kthread.c:388
 ret_from_fork+0x48/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242

read to 0xffffffff8712631c of 4 bytes by task 12742 on cpu 1:
 pcpu_alloc+0x9be/0x10c0 mm/percpu.c:1868
 __alloc_percpu_gfp+0x26/0x30 mm/percpu.c:1930
 bpf_map_alloc_percpu+0xaa/0x200 kernel/bpf/syscall.c:465
 prealloc_init+0x19f/0x470 kernel/bpf/hashtab.c:338
 htab_map_alloc+0x715/0x9e0 kernel/bpf/hashtab.c:569
 map_create+0x713/0xa40 kernel/bpf/syscall.c:1237
 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5439
 __do_sys_bpf kernel/bpf/syscall.c:5561 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5559 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5559
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000003 -> 0x00000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 12742 Comm: syz-executor.1 Not tainted 6.8.0-rc4-syzkaller-00331-gc1ca10ceffbb #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/02/17 07:07 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2024/02/04 12:28 upstream 3a0e92207940 a67b2c42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2024/01/31 23:49 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2024/01/07 01:19 upstream 52b1853b080a d0304e9c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
* Struck through repros no longer work on HEAD.