================================================================== BUG: KCSAN: data-race in __cgroup_account_cputime_field / cgroup_rstat_flush_locked read-write to 0xffffe8ffffc7da10 of 8 bytes by interrupt on cpu 0: __cgroup_account_cputime_field+0x98/0x100 cgroup_account_cputime_field include/linux/cgroup.h:737 [inline] task_group_account_field kernel/sched/cputime.c:113 [inline] account_system_index_time+0x72/0x80 kernel/sched/cputime.c:176 update_process_times+0x22/0x110 kernel/time/timer.c:2069 tick_sched_handle kernel/time/tick-sched.c:243 [inline] tick_sched_timer+0x244/0x2c0 kernel/time/tick-sched.c:1481 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x217/0x700 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1095 [inline] __sysvec_apic_timer_interrupt+0x73/0x210 arch/x86/kernel/apic/apic.c:1112 sysvec_apic_timer_interrupt+0x68/0x80 arch/x86/kernel/apic/apic.c:1106 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:645 get_current kernel/rcu/tree_plugin.h:417 [inline] __rcu_read_unlock+0xc/0x70 kernel/rcu/tree_plugin.h:418 rcu_read_unlock include/linux/rcupdate.h:805 [inline] percpu_ref_tryget_many include/linux/percpu-refcount.h:250 [inline] percpu_ref_tryget include/linux/percpu-refcount.h:266 [inline] obj_cgroup_tryget include/linux/memcontrol.h:786 [inline] __get_obj_cgroup_from_memcg mm/memcontrol.c:3043 [inline] get_obj_cgroup_from_current+0x1a6/0x220 mm/memcontrol.c:3063 memcg_slab_pre_alloc_hook mm/slab.h:448 [inline] slab_pre_alloc_hook+0x73/0x180 mm/slab.h:675 slab_alloc_node mm/slab.c:3240 [inline] slab_alloc mm/slab.c:3265 [inline] __kmem_cache_alloc_lru mm/slab.c:3442 [inline] kmem_cache_alloc+0x58/0x260 mm/slab.c:3451 kmem_cache_zalloc include/linux/slab.h:670 [inline] copy_signal+0x54/0x360 kernel/fork.c:1861 copy_process+0xfe1/0x21b0 kernel/fork.c:2504 kernel_clone+0x169/0x560 kernel/fork.c:2918 __do_sys_clone kernel/fork.c:3061 [inline] __se_sys_clone kernel/fork.c:3045 [inline] __x64_sys_clone+0xe8/0x120 kernel/fork.c:3045 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffffe8ffffc7da10 of 8 bytes by task 8160 on cpu 1: cgroup_base_stat_flush kernel/cgroup/rstat.c:373 [inline] cgroup_rstat_flush_locked+0x2c3/0x700 kernel/cgroup/rstat.c:199 cgroup_rstat_flush+0x2b/0x40 kernel/cgroup/rstat.c:239 do_flush_stats mm/memcontrol.c:658 [inline] mem_cgroup_flush_stats+0x9f/0xd0 mm/memcontrol.c:672 prepare_scan_count mm/vmscan.c:2904 [inline] shrink_node+0x2fa/0x1500 mm/vmscan.c:6489 shrink_zones mm/vmscan.c:6726 [inline] do_try_to_free_pages+0x40d/0xc80 mm/vmscan.c:6788 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:7103 reclaim_high+0xca/0x110 mm/memcontrol.c:2432 mem_cgroup_handle_over_high+0x8c/0x1a0 mm/memcontrol.c:2617 resume_user_mode_work include/linux/resume_user_mode.h:58 [inline] exit_to_user_mode_loop+0x9b/0xe0 kernel/entry/common.c:171 exit_to_user_mode_prepare+0x6c/0xb0 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x26/0x140 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x000000083eec5731 -> 0x000000083f84cdfa Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 8160 Comm: syz-executor.1 Tainted: G W 6.3.0-syzkaller-12378-gc8c655c34e33 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 ==================================================================