================================================================== BUG: KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64 read-write to 0xffffffff866089c0 of 8 bytes by interrupt on cpu 0: tick_do_update_jiffies64+0x112/0x1b0 kernel/time/tick-sched.c:118 tick_sched_do_timer kernel/time/tick-sched.c:232 [inline] tick_nohz_handler+0x7c/0x2d0 kernel/time/tick-sched.c:290 __run_hrtimer kernel/time/hrtimer.c:1739 [inline] __hrtimer_run_queues+0x20d/0x5e0 kernel/time/hrtimer.c:1803 hrtimer_interrupt+0x235/0x4a0 kernel/time/hrtimer.c:1865 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x5c/0x1d0 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 kcsan_setup_watchpoint+0x404/0x410 kernel/kcsan/core.c:705 shrink_slab_memcg mm/shrinker.c:528 [inline] shrink_slab+0x39c/0x850 mm/shrinker.c:628 shrink_node_memcgs mm/vmscan.c:5931 [inline] shrink_node+0x63f/0x1d80 mm/vmscan.c:5970 shrink_zones mm/vmscan.c:6215 [inline] do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6277 try_to_free_mem_cgroup_pages+0x1e3/0x490 mm/vmscan.c:6609 try_charge_memcg+0x2bc/0x7f0 mm/memcontrol.c:2238 obj_cgroup_charge_pages+0xbd/0x1a0 mm/memcontrol.c:2646 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:2673 __alloc_pages_noprof+0x1bc/0x340 mm/page_alloc.c:4768 alloc_pages_mpol_noprof+0xb1/0x1e0 mm/mempolicy.c:2265 alloc_pages_noprof+0xe1/0x100 mm/mempolicy.c:2344 vm_area_alloc_pages mm/vmalloc.c:3589 [inline] __vmalloc_area_node mm/vmalloc.c:3667 [inline] __vmalloc_node_range_noprof+0x6eb/0xe80 mm/vmalloc.c:3844 __kvmalloc_node_noprof+0x121/0x170 mm/util.c:672 ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:256 hash_ipport_create+0x4dc/0x9f0 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1104 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2541 nfnetlink_rcv+0x16c/0x15d0 net/netfilter/nfnetlink.c:667 netlink_unicast_kernel net/netlink/af_netlink.c:1321 [inline] netlink_unicast+0x599/0x670 net/netlink/af_netlink.c:1347 netlink_sendmsg+0x5cc/0x6e0 net/netlink/af_netlink.c:1891 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:726 ____sys_sendmsg+0x312/0x410 net/socket.c:2583 ___sys_sendmsg net/socket.c:2637 [inline] __sys_sendmsg+0x19d/0x230 net/socket.c:2669 __do_sys_sendmsg net/socket.c:2674 [inline] __se_sys_sendmsg net/socket.c:2672 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2672 x64_sys_call+0x2734/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffffff866089c0 of 8 bytes by task 2087 on cpu 1: mem_cgroup_flush_stats_ratelimited+0x29/0x70 mm/memcontrol.c:640 count_shadow_nodes+0x6b/0x230 mm/workingset.c:683 do_shrink_slab+0x5a/0x680 mm/shrinker.c:384 shrink_slab_memcg mm/shrinker.c:550 [inline] shrink_slab+0x4ea/0x850 mm/shrinker.c:628 shrink_node_memcgs mm/vmscan.c:5931 [inline] shrink_node+0x63f/0x1d80 mm/vmscan.c:5970 shrink_zones mm/vmscan.c:6215 [inline] do_try_to_free_pages+0x3c6/0xc50 mm/vmscan.c:6277 try_to_free_mem_cgroup_pages+0x1e3/0x490 mm/vmscan.c:6609 try_charge_memcg+0x2bc/0x7f0 mm/memcontrol.c:2238 try_charge mm/memcontrol-v1.h:19 [inline] charge_memcg+0x50/0xc0 mm/memcontrol.c:4497 mem_cgroup_swapin_charge_folio+0xd0/0x150 mm/memcontrol.c:4582 __read_swap_cache_async+0x236/0x480 mm/swap_state.c:518 swap_cluster_readahead+0x381/0x3f0 mm/swap_state.c:703 swapin_readahead+0xe4/0x6f0 mm/swap_state.c:882 do_swap_page+0x31b/0x2550 mm/memory.c:4341 handle_pte_fault mm/memory.c:5804 [inline] __handle_mm_fault mm/memory.c:5944 [inline] handle_mm_fault+0x8e4/0x2ac0 mm/memory.c:6112 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 value changed: 0x000000010001d377 -> 0x000000010001d378 Reported by Kernel Concurrency Sanitizer on: CPU: 1 UID: 0 PID: 2087 Comm: syz-executor Tainted: G W 6.12.0-syzkaller-09435-g2c22dc1ee3a1 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 ================================================================== syz-executor invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0 CPU: 1 UID: 0 PID: 2087 Comm: syz-executor Tainted: G W 6.12.0-syzkaller-09435-g2c22dc1ee3a1 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xf2/0x150 lib/dump_stack.c:120 dump_stack+0x15/0x20 lib/dump_stack.c:129 dump_header+0x83/0x2d0 mm/oom_kill.c:461 oom_kill_process+0x341/0x4c0 mm/oom_kill.c:1034 out_of_memory+0x9af/0xbe0 mm/oom_kill.c:1172 mem_cgroup_out_of_memory+0x13e/0x190 mm/memcontrol.c:1630 mem_cgroup_oom mm/memcontrol.c:1653 [inline] try_charge_memcg+0x508/0x7f0 mm/memcontrol.c:2280 try_charge mm/memcontrol-v1.h:19 [inline] charge_memcg+0x50/0xc0 mm/memcontrol.c:4497 mem_cgroup_swapin_charge_folio+0xd0/0x150 mm/memcontrol.c:4582 __read_swap_cache_async+0x236/0x480 mm/swap_state.c:518 swap_cluster_readahead+0x381/0x3f0 mm/swap_state.c:703 swapin_readahead+0xe4/0x6f0 mm/swap_state.c:882 do_swap_page+0x31b/0x2550 mm/memory.c:4341 handle_pte_fault mm/memory.c:5804 [inline] __handle_mm_fault mm/memory.c:5944 [inline] handle_mm_fault+0x8e4/0x2ac0 mm/memory.c:6112 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline] handle_page_fault arch/x86/mm/fault.c:1481 [inline] exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1539 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7fc30b1f08c5 Code: 00 00 00 00 00 83 ff 03 74 7b 83 ff 02 b8 fa ff ff ff 49 89 ca 0f 44 f8 80 3d 7e cc 15 00 00 74 14 b8 e6 00 00 00 0f 05 f7 d8 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec 28 48 89 54 24 10 89 74 RSP: 002b:00007ffda2e92428 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 00000000000000a2 RCX: 00007fc30b1f08c3 RDX: 00007ffda2e92440 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 00007ffda2e9249c R08: 0000000029d46e33 R09: 7fffffffffffffff R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000032 R13: 000000000016ce04 R14: 000000000016cdc7 R15: 00007ffda2e924f0 memory: usage 307200kB, limit 307200kB, failcnt 5572 memory+swap: usage 307564kB, limit 9007199254740988kB, failcnt 0 kmem: usage 307200kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz6: cache 0 rss 0 shmem 0 mapped_file 0 dirty 0 writeback 0 workingset_refault_anon 229 workingset_refault_file 0 swap 417792 swapcached 0 pgpgin 1484693 pgpgout 1484693 pgfault 1103731 pgmajfault 80 inactive_anon 0 active_anon 0 inactive_file 0 active_file 0 unevictable 0 hierarchical_memory_limit 314572800 hierarchical_memsw_limit 9223372036854771712 total_cache 0 total_rss 0 total_shmem 0 total_mapped_file 0 total_dirty 0 total_writeback 0 total_workingset_refault_anon 229 total_workingset_refault_file 0 total_swap 417792 total_swapcached 0 total_pgpgin 1484770 total_pgpgout 1484770 total_pgfault 1103849 total_pgmajfault 80 total_inactive_anon 0 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=/syz6,task_memcg=/syz6,task=syz.6.25192,pid=2958,uid=0 Memory cgroup out of memory: Killed process 2958 (syz.6.25192) total-vm:93264kB, anon-rss:720kB, file-rss:22032kB, shmem-rss:0kB, UID:0 pgtables:116kB oom_score_adj:1000