syzbot


KCSAN: data-race in drain_all_stock / drain_obj_stock (2)

Status: auto-closed as invalid on 2022/04/28 00:32
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 247d, last: 247d
similar bugs (2):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drain_all_stock / drain_obj_stock 1 300d 300d 0/24 auto-closed as invalid on 2022/03/06 02:49
upstream KCSAN: data-race in drain_all_stock / drain_obj_stock (3) 1 111d 111d 0/24 auto-closed as invalid on 2022/09/10 21:57

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

write to 0xffff888237d28378 of 8 bytes by interrupt on cpu 1:
 drain_obj_stock+0x474/0x550 mm/memcontrol.c:3148
 refill_obj_stock+0xa0/0x210 mm/memcontrol.c:3182
 obj_cgroup_uncharge+0xa/0x10 mm/memcontrol.c:3250
 memcg_slab_free_hook+0xe7/0x190 mm/slab.h:586
 ___cache_free+0x46/0x350 mm/slab.c:3457
 __cache_free mm/slab.c:3446 [inline]
 kmem_cache_free+0x65/0x110 mm/slab.c:3748
 put_pid kernel/pid.c:114 [inline]
 delayed_put_pid+0x69/0xb0 kernel/pid.c:123
 rcu_do_batch kernel/rcu/tree.c:2535 [inline]
 rcu_core+0x886/0xee0 kernel/rcu/tree.c:2786
 rcu_core_si+0x9/0x10 kernel/rcu/tree.c:2803
 __do_softirq+0x158/0x2de kernel/softirq.c:558
 run_ksoftirqd+0x1f/0x30 kernel/softirq.c:921
 smpboot_thread_fn+0x308/0x4a0 kernel/smpboot.c:164
 kthread+0x1bf/0x1e0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

read to 0xffff888237d28378 of 8 bytes by task 4301 on cpu 0:
 obj_stock_flush_required mm/memcontrol.c:3161 [inline]
 drain_all_stock+0x189/0x2e0 mm/memcontrol.c:2273
 mem_cgroup_css_offline+0x79/0x210 mm/memcontrol.c:5223
 offline_css kernel/cgroup/cgroup.c:5277 [inline]
 css_killed_work_fn+0x8d/0x210 kernel/cgroup/cgroup.c:5554
 process_one_work+0x3f6/0x960 kernel/workqueue.c:2307
 worker_thread+0x616/0xa70 kernel/workqueue.c:2454
 kthread+0x1bf/0x1e0 kernel/kthread.c:377
 ret_from_fork+0x1f/0x30

value changed: 0xffff888131c71600 -> 0xffff888131c8bdc0

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 4301 Comm: kworker/0:15 Not tainted 5.17.0-syzkaller-02172-g6b1f86f8e9c7-dirty #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: cgroup_destroy css_killed_work_fn
==================================================================

Crashes (1):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2022/03/24 00:30 upstream 6b1f86f8e9c7 5ff41e94 .config log report info KCSAN: data-race in drain_all_stock / drain_obj_stock
* Struck through repros no longer work on HEAD.