================================================================== BUG: KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64 read-write to 0xffffffff868099c0 of 8 bytes by interrupt on cpu 0: tick_do_update_jiffies64+0x113/0x1c0 kernel/time/tick-sched.c:118 tick_sched_do_timer kernel/time/tick-sched.c:232 [inline] tick_nohz_handler+0x7f/0x2d0 kernel/time/tick-sched.c:290 __run_hrtimer kernel/time/hrtimer.c:1777 [inline] __hrtimer_run_queues+0x20f/0x5a0 kernel/time/hrtimer.c:1841 hrtimer_interrupt+0x21a/0x460 kernel/time/hrtimer.c:1903 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1041 [inline] __sysvec_apic_timer_interrupt+0x5f/0x1d0 arch/x86/kernel/apic/apic.c:1058 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1052 [inline] sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1052 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:697 kcsan_setup_watchpoint+0x415/0x430 kernel/kcsan/core.c:705 folios_put_refs+0xa1/0x2d0 mm/swap.c:959 free_pages_and_swap_cache+0x278/0x400 mm/swap_state.c:355 __tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline] tlb_batch_pages_flush mm/mmu_gather.c:149 [inline] tlb_flush_mmu_free mm/mmu_gather.c:397 [inline] tlb_flush_mmu+0x2dc/0x450 mm/mmu_gather.c:404 zap_pte_range mm/memory.c:1893 [inline] zap_pmd_range mm/memory.c:1946 [inline] zap_pud_range mm/memory.c:1975 [inline] zap_p4d_range mm/memory.c:1996 [inline] unmap_page_range+0x22c8/0x25c0 mm/memory.c:2017 unmap_single_vma mm/memory.c:2060 [inline] unmap_vmas+0x23d/0x3a0 mm/memory.c:2104 exit_mmap+0x1b0/0x6c0 mm/mmap.c:1280 __mmput+0x28/0x1c0 kernel/fork.c:1133 mmput+0x40/0x50 kernel/fork.c:1156 exit_mm+0xe4/0x180 kernel/exit.c:582 do_exit+0x417/0x15c0 kernel/exit.c:954 do_group_exit+0xff/0x140 kernel/exit.c:1107 get_signal+0xe58/0xf70 kernel/signal.c:3034 arch_do_signal_or_restart+0x96/0x440 arch/x86/kernel/signal.c:337 exit_to_user_mode_loop+0x77/0x110 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] syscall_exit_to_user_mode_work include/linux/entry-common.h:175 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:210 [inline] do_syscall_64+0x1d6/0x200 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffffff868099c0 of 8 bytes by task 29847 on cpu 1: mem_cgroup_flush_stats_ratelimited+0x29/0x70 mm/memcontrol.c:635 count_shadow_nodes+0x6a/0x230 mm/workingset.c:678 do_shrink_slab+0x63/0x680 mm/shrinker.c:384 shrink_slab_memcg mm/shrinker.c:550 [inline] shrink_slab+0x448/0x760 mm/shrinker.c:628 shrink_node_memcgs mm/vmscan.c:6056 [inline] shrink_node+0x6c3/0x2120 mm/vmscan.c:6095 shrink_zones mm/vmscan.c:6339 [inline] do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6401 try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6729 try_charge_memcg+0x383/0xa10 mm/memcontrol.c:2356 try_charge mm/memcontrol.c:2498 [inline] charge_memcg+0x51/0xc0 mm/memcontrol.c:4701 mem_cgroup_swapin_charge_folio+0xcc/0x150 mm/memcontrol.c:4787 __read_swap_cache_async+0x17b/0x2d0 mm/swap_state.c:481 swap_cluster_readahead+0x262/0x3c0 mm/swap_state.c:650 swapin_readahead+0xde/0x6f0 mm/swap_state.c:813 do_swap_page+0x2ae/0x2370 mm/memory.c:4713 handle_pte_fault mm/memory.c:6180 [inline] __handle_mm_fault mm/memory.c:6318 [inline] handle_mm_fault+0x9a5/0x2be0 mm/memory.c:6487 do_user_addr_fault+0x630/0x1080 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 value changed: 0x0000000100006997 -> 0x0000000100006998 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 29847 Comm: syz.4.8781 Tainted: G W syzkaller #0 PREEMPT(voluntary) Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 ================================================================== syz.4.8781 invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=1000 CPU: 1 UID: 0 PID: 29847 Comm: syz.4.8781 Tainted: G W syzkaller #0 PREEMPT(voluntary) Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: __dump_stack+0x1d/0x30 lib/dump_stack.c:94 dump_stack_lvl+0xe8/0x140 lib/dump_stack.c:120 dump_stack+0x15/0x1b lib/dump_stack.c:129 dump_header+0x81/0x220 mm/oom_kill.c:467 oom_kill_process+0x342/0x400 mm/oom_kill.c:1046 out_of_memory+0x979/0xb80 mm/oom_kill.c:1184 mem_cgroup_out_of_memory mm/memcontrol.c:1650 [inline] mem_cgroup_oom mm/memcontrol.c:1673 [inline] try_charge_memcg+0x610/0xa10 mm/memcontrol.c:2398 try_charge mm/memcontrol.c:2498 [inline] charge_memcg+0x51/0xc0 mm/memcontrol.c:4701 mem_cgroup_swapin_charge_folio+0xcc/0x150 mm/memcontrol.c:4787 __read_swap_cache_async+0x17b/0x2d0 mm/swap_state.c:481 swap_cluster_readahead+0x262/0x3c0 mm/swap_state.c:650 swapin_readahead+0xde/0x6f0 mm/swap_state.c:813 do_swap_page+0x2ae/0x2370 mm/memory.c:4713 handle_pte_fault mm/memory.c:6180 [inline] __handle_mm_fault mm/memory.c:6318 [inline] handle_mm_fault+0x9a5/0x2be0 mm/memory.c:6487 do_user_addr_fault+0x630/0x1080 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x62/0xa0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618 RIP: 0033:0x7f2164a77460 Code: 6e c7 89 13 48 8b 50 08 0f 16 40 50 0f 11 00 48 89 50 50 48 8b 50 10 48 89 78 10 48 89 50 40 48 89 d7 eb b2 66 0f 1f 44 00 00 <64> 48 8b 0c 25 10 00 00 00 8b 91 08 03 00 00 48 8d b9 08 03 00 00 RSP: 002b:00007ffe43153e78 EFLAGS: 00010202 RAX: 00000000fffffffa RBX: 00007f2164ca5fa0 RCX: 0000000000000000 RDX: 00007ffe43153ec0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007f2164ca7da0 R08: 0000000034ee6293 R09: 7fffffffffffffff R10: 0000000000000000 R11: 0000000000000293 R12: 000000000008b613 R13: 00007f2164ca6090 R14: ffffffffffffffff R15: 00007ffe43154000 memory: usage 307200kB, limit 307200kB, failcnt 502 memory+swap: usage 307896kB, limit 9007199254740988kB, failcnt 0 kmem: usage 307192kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz4 : cache 0 rss 4096 shmem 0 mapped_file 0 dirty 0 writeback 4096 workingset_refault_anon 204 workingset_refault_file 5541 swap 712704 swapcached 8192 pgpgin 964495 pgpgout 964493 pgfault 665938 pgmajfault 148 inactive_anon 8192 active_anon 0 inactive_file 0 active_file 0 unevictable 0 hierarchical_memory_limit 314572800 hierarchical_memsw_limit 9223372036854771712 total_cache 0 total_rss 4096 total_shmem 0 total_mapped_file 0 total_dirty 0 total_writeback 4096 total_workingset_refault_anon 204 total_workingset_refault_file 5541 total_swap 712704 total_swapcached 8192 total_pgpgin 964495 total_pgpgout 964493 total_pgfault 665938 total_pgmajfault 148 total_inactive_anon 8192 total_active_anon 0 total_inactive_file 0 total_active_file 0 total_unevictable 0 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/syz4,task_memcg=/syz4,task=syz.4.8781,pid=29847,uid=0 Memory cgroup out of memory: Killed process 29847 (syz.4.8781) total-vm:94084kB, anon-rss:1136kB, file-rss:22568kB, shmem-rss:0kB, UID:0 pgtables:128kB oom_score_adj:1000