syzbot


KCSAN: data-race in pcpu_alloc / pcpu_alloc (2)

Status: auto-closed as invalid on 2022/09/13 08:17
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 140d, last: 118d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc (3) 1 36d 36d 0/24 auto-obsoleted due to no activity on 2022/12/03 18:53
upstream KCSAN: data-race in pcpu_alloc / pcpu_alloc 1 234d 234d 0/24 auto-closed as invalid on 2022/05/20 04:11

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

read-write to 0xffffffff870c39b4 of 4 bytes by task 24285 on cpu 0:
 pcpu_reintegrate_chunk mm/percpu.c:588 [inline]
 pcpu_alloc+0x6e2/0x1040 mm/percpu.c:1815
 __alloc_percpu_gfp+0x22/0x30 mm/percpu.c:1937
 bpf_map_alloc_percpu+0xbd/0x200 kernel/bpf/syscall.c:481
 prealloc_init kernel/bpf/hashtab.c:346 [inline]
 htab_map_alloc+0x76e/0xc00 kernel/bpf/hashtab.c:558
 find_and_alloc_map kernel/bpf/syscall.c:131 [inline]
 map_create+0x38a/0x6f0 kernel/bpf/syscall.c:1102
 __sys_bpf+0x296/0x630 kernel/bpf/syscall.c:4936
 __do_sys_bpf kernel/bpf/syscall.c:5058 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5056 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:5056
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

read to 0xffffffff870c39b4 of 4 bytes by task 24274 on cpu 1:
 pcpu_alloc+0x9c6/0x1040 mm/percpu.c:1877
 __alloc_percpu_gfp+0x22/0x30 mm/percpu.c:1937
 bpf_map_alloc_percpu+0xbd/0x200 kernel/bpf/syscall.c:481
 prealloc_init kernel/bpf/hashtab.c:346 [inline]
 htab_map_alloc+0x76e/0xc00 kernel/bpf/hashtab.c:558
 find_and_alloc_map kernel/bpf/syscall.c:131 [inline]
 map_create+0x38a/0x6f0 kernel/bpf/syscall.c:1102
 __sys_bpf+0x296/0x630 kernel/bpf/syscall.c:4936
 __do_sys_bpf kernel/bpf/syscall.c:5058 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5056 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:5056
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x70 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd

value changed: 0x00000000 -> 0xfffffff8

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 24274 Comm: syz-executor.3 Not tainted 5.19.0-syzkaller-13215-geb555cb5b794-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/2022
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/08/09 08:09 upstream eb555cb5b794 da700653 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_alloc
ci2-upstream-kcsan-gce 2022/07/22 19:29 upstream 4ba1329cbb94 22343af4 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_alloc
ci2-upstream-kcsan-gce 2022/07/17 21:02 upstream ff6992735ade 95cb00d1 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_alloc
* Struck through repros no longer work on HEAD.