syzbot


KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (6)

Status: auto-closed as invalid on 2022/06/16 16:40
Reported-by: syzbot+@syzkaller.appspotmail.com
First crash: 203d, last: 199d
similar bugs (5):
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (3) 1 545d 545d 0/24 auto-closed as invalid on 2021/07/05 21:29
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked 3 1106d 1126d 0/24 auto-closed as invalid on 2020/01/27 12:36
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (2) 2 802d 833d 0/24 auto-closed as invalid on 2020/10/22 00:22
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (4) 2 469d 492d 0/24 auto-closed as invalid on 2021/09/20 09:16
upstream KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked (5) 6 297d 299d 0/24 auto-closed as invalid on 2022/03/10 20:48

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

read-write to 0xffffe8ffffc6dbe8 of 8 bytes by task 32737 on cpu 0:
 __cgroup_account_cputime+0x5a/0xb0 kernel/cgroup/rstat.c:379
 cgroup_account_cputime include/linux/cgroup.h:797 [inline]
 update_curr+0xf4/0x240 kernel/sched/fair.c:909
 enqueue_entity+0x38/0x560 kernel/sched/fair.c:4325
 enqueue_task_fair+0xc9/0x410 kernel/sched/fair.c:5673
 enqueue_task kernel/sched/core.c:2075 [inline]
 activate_task+0xb7/0xe0 kernel/sched/core.c:2100
 ttwu_do_activate kernel/sched/core.c:3679 [inline]
 ttwu_queue+0x10e/0x150 kernel/sched/core.c:3875
 try_to_wake_up+0x301/0x4a0 kernel/sched/core.c:4198
 wake_up_process kernel/sched/core.c:4282 [inline]
 wake_up_q+0x41/0x80 kernel/sched/core.c:1029
 futex_wake+0x2a1/0x2f0 kernel/futex/waitwake.c:184
 do_futex+0x267/0x2b0 kernel/futex/syscalls.c:111
 __do_sys_futex kernel/futex/syscalls.c:183 [inline]
 __se_sys_futex+0xe8/0x350 kernel/futex/syscalls.c:164
 __x64_sys_futex+0x74/0x80 kernel/futex/syscalls.c:164
 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+0x44/0xae

read to 0xffffe8ffffc6dbe8 of 8 bytes by task 1852 on cpu 1:
 cgroup_base_stat_flush kernel/cgroup/rstat.c:337 [inline]
 cgroup_rstat_flush_locked+0x2e3/0x750 kernel/cgroup/rstat.c:170
 cgroup_rstat_flush_irqsafe+0x24/0x40 kernel/cgroup/rstat.c:224
 __mem_cgroup_flush_stats mm/memcontrol.c:644 [inline]
 mem_cgroup_flush_stats+0xc1/0x110 mm/memcontrol.c:652
 shrink_node+0x2fc/0x1110 mm/vmscan.c:3126
 shrink_zones+0x2c1/0x5d0 mm/vmscan.c:3458
 do_try_to_free_pages+0x165/0x720 mm/vmscan.c:3516
 try_to_free_mem_cgroup_pages+0x1cd/0x420 mm/vmscan.c:3830
 reclaim_high+0xcd/0x110 mm/memcontrol.c:2325
 mem_cgroup_handle_over_high+0x75/0x120 mm/memcontrol.c:2509
 resume_user_mode_work include/linux/resume_user_mode.h:58 [inline]
 exit_to_user_mode_loop+0xa5/0x130 kernel/entry/common.c:169
 exit_to_user_mode_prepare kernel/entry/common.c:201 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x6a/0x90 kernel/entry/common.c:294
 do_syscall_64+0x37/0x70 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000008fd0942cc -> 0x00000008fd0aa5f5

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 1852 Comm: syz-executor.1 Not tainted 5.18.0-rc6-syzkaller-00009-gfeb9c5e19e91 #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/05/12 16:32 upstream feb9c5e19e91 9ad6612a .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/11 17:17 upstream feb9c5e19e91 beb0b407 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/11 17:12 upstream feb9c5e19e91 beb0b407 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/11 08:41 upstream feb9c5e19e91 8d7b3b67 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/09 17:05 upstream 9be9ed2612b5 8b277b8e .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/09 11:10 upstream c5eb0a61238d 8b277b8e .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/09 05:38 upstream c5eb0a61238d e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/09 03:57 upstream c5eb0a61238d e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/08 23:25 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/08 20:26 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/08 19:21 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
ci2-upstream-kcsan-gce 2022/05/08 19:16 upstream 379c72654524 e60b1103 .config log report info KCSAN: data-race in __cgroup_account_cputime / cgroup_rstat_flush_locked
* Struck through repros no longer work on HEAD.