syzbot


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

Status: auto-obsoleted due to no activity on 2023/12/31 20:24
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+1bdaa74c416fdc11d7ad@syzkaller.appspotmail.com
First crash: 112d, last: 89d
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 301d 555d 0/26 auto-obsoleted due to no activity on 2023/06/02 17:22
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn net 4 1333d 1343d 0/26 auto-closed as invalid on 2020/08/04 06:35
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (2) net 3 1248d 1282d 0/26 auto-closed as invalid on 2020/10/28 20:02
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (9) kernel 4 6d14h 45d 0/26 moderation: reported on 2024/01/09 18:25
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (4) bpf 12 630d 800d 0/26 auto-closed as invalid on 2022/07/08 11:31
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (3) bpf 12 1054d 1151d 0/26 auto-closed as invalid on 2021/05/17 09:01
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (6) net 7 221d 236d 0/26 auto-obsoleted due to no activity on 2023/08/21 13:19
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (7) kernel 1 149d 149d 0/26 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 0xffffffff86efc31c of 4 bytes by task 3187 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+0x94c/0xa50 mm/percpu.c:2238
 process_one_work kernel/workqueue.c:2630 [inline]
 process_scheduled_works+0x5b8/0xa30 kernel/workqueue.c:2703
 worker_thread+0x525/0x730 kernel/workqueue.c:2784
 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 0xffffffff86efc31c of 4 bytes by task 3747 on cpu 1:
 pcpu_alloc+0x9bc/0x10b0 mm/percpu.c:1868
 __alloc_percpu_gfp+0x26/0x30 mm/percpu.c:1930
 bpf_map_alloc_percpu+0xaa/0x200 kernel/bpf/syscall.c:467
 prealloc_init+0x19f/0x470 kernel/bpf/hashtab.c:337
 htab_map_alloc+0x715/0x9e0 kernel/bpf/hashtab.c:568
 map_create+0x713/0xa40 kernel/bpf/syscall.c:1210
 __sys_bpf+0x62a/0x780 kernel/bpf/syscall.c:5365
 __do_sys_bpf kernel/bpf/syscall.c:5487 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5485 [inline]
 __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5485
 do_syscall_x64 arch/x86/entry/common.c:51 [inline]
 do_syscall_64+0x44/0x110 arch/x86/entry/common.c:82
 entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000001 -> 0x00000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 3747 Comm: syz-executor.4 Not tainted 6.7.0-rc2-syzkaller-00265-gd2da77f431ac #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/11/26 20:23 upstream d2da77f431ac 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2023/11/26 07:25 upstream 090472ed9c92 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2023/11/23 18:07 upstream 9b6de136b5f0 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2023/11/23 05:02 upstream 9b6de136b5f0 fc59b78e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2023/11/21 21:44 upstream c2d5304e6c64 cb976f63 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
2023/11/03 21:03 upstream 6bdfe2d88b9f 500bfdc4 .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.