syzbot


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

Status: auto-closed as invalid on 2021/11/28 07:11
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 405d, last: 400d
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 105d 105d 0/24 auto-closed as invalid on 2022/09/19 00:38
upstream KCSAN: data-race in drain_all_stock / drain_stock (3) 1 244d 244d 0/24 auto-closed as invalid on 2022/05/03 08:41
upstream KCSAN: data-race in drain_all_stock / drain_stock 1 866d 866d 0/24 auto-closed as invalid on 2020/08/18 19:14
upstream KCSAN: data-race in drain_all_stock / drain_stock (4) 2 153d 183d 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 0xffff888237d22e68 of 8 bytes by task 30333 on cpu 1:
 drain_stock+0x84/0x100 mm/memcontrol.c:2167
 refill_stock mm/memcontrol.c:2205 [inline]
 try_charge_memcg+0x7f2/0xa00 mm/memcontrol.c:2669
 try_charge mm/memcontrol.c:2722 [inline]
 charge_memcg mm/memcontrol.c:6688 [inline]
 __mem_cgroup_charge+0x3d/0x170 mm/memcontrol.c:6724
 mem_cgroup_charge include/linux/memcontrol.h:694 [inline]
 wp_page_copy+0x255/0x10a0 mm/memory.c:3022
 do_wp_page+0x5a8/0xba0
 handle_pte_fault mm/memory.c:4577 [inline]
 __handle_mm_fault mm/memory.c:4694 [inline]
 handle_mm_fault+0x96e/0x1580 mm/memory.c:4792
 do_user_addr_fault+0x609/0xbe0 arch/x86/mm/fault.c:1397
 handle_page_fault arch/x86/mm/fault.c:1485 [inline]
 exc_page_fault+0x91/0x220 arch/x86/mm/fault.c:1541
 asm_exc_page_fault+0x1e/0x30

read to 0xffff888237d22e68 of 8 bytes by task 5 on cpu 0:
 drain_all_stock+0xa7/0x460 mm/memcontrol.c:2241
 mem_cgroup_css_offline+0x96/0x220 mm/memcontrol.c:5280
 offline_css kernel/cgroup/cgroup.c:5215 [inline]
 css_killed_work_fn+0x8d/0x210 kernel/cgroup/cgroup.c:5492
 process_one_work+0x402/0x910 kernel/workqueue.c:2297
 worker_thread+0x636/0xae0 kernel/workqueue.c:2444
 kthread+0x262/0x280 kernel/kthread.c:319
 ret_from_fork+0x1f/0x30

value changed: 0xffff888131255000 -> 0xffff8881310f5000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 5 Comm: kworker/0:0 Tainted: G        W         5.15.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: cgroup_destroy css_killed_work_fn
==================================================================

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci2-upstream-kcsan-gce 2021/10/24 07:02 upstream 9c0c4d24ac00 282f03fb .config log report info KCSAN: data-race in drain_all_stock / drain_stock
ci2-upstream-kcsan-gce 2021/10/22 10:26 upstream 2f111a6fd5b5 55f90bc6 .config log report info KCSAN: data-race in drain_all_stock / drain_stock
ci2-upstream-kcsan-gce 2021/10/19 13:51 upstream 519d81956ee2 24dc29db .config log report info KCSAN: data-race in drain_all_stock / drain_stock
* Struck through repros no longer work on HEAD.