syzbot


KCSAN: data-race in drain_all_stock / drain_stock (3)

Status: auto-closed as invalid on 2022/05/03 08:41
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 253d, last: 253d
similar bugs (4):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drain_all_stock / drain_stock (5) 1 114d 114d 0/24 auto-closed as invalid on 2022/09/19 00:38
upstream KCSAN: data-race in drain_all_stock / drain_stock (2) 3 409d 414d 0/24 auto-closed as invalid on 2021/11/28 07:11
upstream KCSAN: data-race in drain_all_stock / drain_stock 1 876d 876d 0/24 auto-closed as invalid on 2020/08/18 19:14
upstream KCSAN: data-race in drain_all_stock / drain_stock (4) 2 162d 193d 0/24 auto-closed as invalid on 2022/08/02 11:05

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

write to 0xffff888237c28368 of 8 bytes by task 27443 on cpu 0:
 drain_stock+0x89/0x110 mm/memcontrol.c:2189
 __refill_stock mm/memcontrol.c:2225 [inline]
 refill_stock mm/memcontrol.c:2240 [inline]
 try_charge_memcg+0x849/0xa70 mm/memcontrol.c:2681
 obj_cgroup_charge_pages mm/memcontrol.c:2951 [inline]
 __memcg_kmem_charge_page+0x2e6/0x490 mm/memcontrol.c:2977
 __alloc_pages+0x1b7/0x330 mm/page_alloc.c:5422
 alloc_pages+0x316/0x420
 vm_area_alloc_pages mm/vmalloc.c:2942 [inline]
 __vmalloc_area_node+0x479/0xb90 mm/vmalloc.c:3001
 __vmalloc_node_range+0x24b/0x2e0 mm/vmalloc.c:3172
 __bpf_map_area_alloc+0xfd/0x120 kernel/bpf/syscall.c:330
 bpf_map_area_alloc+0x18/0x20 kernel/bpf/syscall.c:337
 bloom_map_alloc+0x229/0x370 kernel/bpf/bloom_filter.c:144
 find_and_alloc_map kernel/bpf/syscall.c:129 [inline]
 map_create kernel/bpf/syscall.c:864 [inline]
 __sys_bpf+0x484f/0xa1f0 kernel/bpf/syscall.c:4645
 __do_sys_bpf kernel/bpf/syscall.c:4767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4765 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4765
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888237c28368 of 8 bytes by task 27424 on cpu 1:
 drain_all_stock+0x9c/0x2e0 mm/memcontrol.c:2269
 try_charge_memcg+0x682/0xa70 mm/memcontrol.c:2612
 obj_cgroup_charge_pages mm/memcontrol.c:2951 [inline]
 __memcg_kmem_charge_page+0x2e6/0x490 mm/memcontrol.c:2977
 __alloc_pages+0x1b7/0x330 mm/page_alloc.c:5422
 alloc_pages+0x316/0x420
 vm_area_alloc_pages mm/vmalloc.c:2942 [inline]
 __vmalloc_area_node+0x479/0xb90 mm/vmalloc.c:3001
 __vmalloc_node_range+0x24b/0x2e0 mm/vmalloc.c:3172
 __bpf_map_area_alloc+0xfd/0x120 kernel/bpf/syscall.c:330
 bpf_map_area_alloc+0x18/0x20 kernel/bpf/syscall.c:337
 bloom_map_alloc+0x229/0x370 kernel/bpf/bloom_filter.c:144
 find_and_alloc_map kernel/bpf/syscall.c:129 [inline]
 map_create kernel/bpf/syscall.c:864 [inline]
 __sys_bpf+0x484f/0xa1f0 kernel/bpf/syscall.c:4645
 __do_sys_bpf kernel/bpf/syscall.c:4767 [inline]
 __se_sys_bpf kernel/bpf/syscall.c:4765 [inline]
 __x64_sys_bpf+0x3f/0x50 kernel/bpf/syscall.c:4765
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x2b/0x50 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0xffff88811c01f000 -> 0xffff88811c0cb000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 27424 Comm: syz-executor.4 Not tainted 5.17.0-syzkaller-11407-gae085d7f9365-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/29 08:34 upstream ae085d7f9365 6bdac766 .config log report info KCSAN: data-race in drain_all_stock / drain_stock
* Struck through repros no longer work on HEAD.