syzbot


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

Status: auto-closed as invalid on 2022/07/08 11:31
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 355d, last: 185d
similar bugs (3):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn 4 888d 898d 0/24 auto-closed as invalid on 2020/08/04 06:35
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (2) 3 802d 837d 0/24 auto-closed as invalid on 2020/10/28 20:02
upstream KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn (3) 12 608d 706d 0/24 auto-closed as invalid on 2021/05/17 09:01

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

read-write to 0xffffffff86ea097c of 4 bytes by task 1913 on cpu 1:
 pcpu_update_empty_pages mm/percpu.c:606 [inline]
 pcpu_chunk_populated mm/percpu.c:1534 [inline]
 pcpu_balance_populated mm/percpu.c:2095 [inline]
 pcpu_balance_workfn+0xb27/0xce0 mm/percpu.c:2246
 process_one_work+0x3d3/0x720 kernel/workqueue.c:2289
 worker_thread+0x618/0xa70 kernel/workqueue.c:2436
 kthread+0x1a9/0x1e0 kernel/kthread.c:376
 ret_from_fork+0x1f/0x30

read to 0xffffffff86ea097c of 4 bytes by task 13129 on cpu 0:
 pcpu_alloc+0x9cb/0x1020 mm/percpu.c:1877
 __alloc_percpu_gfp+0x22/0x30 mm/percpu.c:1937
 bpf_map_alloc_percpu+0xab/0x120 kernel/bpf/syscall.c:462
 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/0x710 kernel/bpf/syscall.c:1082
 __sys_bpf+0x296/0x630 kernel/bpf/syscall.c:4899
 __do_sys_bpf kernel/bpf/syscall.c:5021 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:5019 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:5019
 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+0x46/0xb0

value changed: 0x00000001 -> 0x00000004

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 13129 Comm: syz-executor.0 Not tainted 5.18.0-syzkaller-12234-g50fd82b3a9a9-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (12):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/06/03 11:29 upstream 50fd82b3a9a9 eee80d3c .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/05/26 21:52 upstream 16477cdfefdb 3037caa9 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/05/07 14:53 upstream 4b97bac0756a e60b1103 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/05/03 19:22 upstream ef8e4d3c2ab1 dc9e5259 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/04/09 10:52 upstream f1b45d8ccb98 e22c3da3 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/04/08 18:27 upstream 1831fed55973 e22c3da3 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/03/29 10:41 upstream 1930a6e739c4 6bdac766 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/03/05 17:24 upstream ac84e82f78cb 7bdd8b2c .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/02/08 13:58 upstream 555f3d7be91a 0b33604d .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/02/01 21:36 upstream 9f7fb8de5d9b c1c1631d .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2022/01/14 17:46 upstream 871bfa02d08d 53e00b45 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
ci2-upstream-kcsan-gce 2021/12/15 00:18 upstream 5472f14a3742 f752fb53 .config log report info KCSAN: data-race in pcpu_alloc / pcpu_balance_workfn
* Struck through repros no longer work on HEAD.