================================================================== BUG: KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64 read-write to 0xffffffff860079c0 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:1692 [inline] __hrtimer_run_queues+0x214/0x5e0 kernel/time/hrtimer.c:1756 hrtimer_interrupt+0x210/0x7b0 kernel/time/hrtimer.c:1818 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x5c/0x1a0 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x6e/0x80 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 munlock_folio+0x0/0x130 mm/mlock.c:283 munlock_vma_folio mm/internal.h:782 [inline] __folio_remove_rmap mm/rmap.c:1573 [inline] folio_remove_rmap_ptes mm/rmap.c:1590 [inline] try_to_migrate_one+0xd52/0x1280 mm/rmap.c:2274 rmap_walk_anon+0x295/0x430 mm/rmap.c:2599 try_to_migrate+0x11f/0x150 migrate_folio_unmap mm/migrate.c:1247 [inline] migrate_pages_batch+0x5ea/0x18a0 mm/migrate.c:1678 migrate_pages_sync mm/migrate.c:1844 [inline] migrate_pages+0xd41/0x17f0 mm/migrate.c:1953 do_mbind mm/mempolicy.c:1390 [inline] kernel_mbind mm/mempolicy.c:1532 [inline] __do_sys_mbind mm/mempolicy.c:1606 [inline] __se_sys_mbind+0xeb6/0x1030 mm/mempolicy.c:1602 __x64_sys_mbind+0x78/0x90 mm/mempolicy.c:1602 x64_sys_call+0x1cee/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:238 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f read to 0xffffffff860079c0 of 8 bytes by task 26405 on cpu 1: mem_cgroup_flush_stats_ratelimited+0x29/0x100 mm/memcontrol.c:772 count_shadow_nodes+0x69/0x3d0 mm/workingset.c:684 do_shrink_slab+0x5a/0x690 mm/shrinker.c:382 shrink_slab_memcg mm/shrinker.c:548 [inline] shrink_slab+0x4f7/0x870 mm/shrinker.c:626 shrink_node_memcgs mm/vmscan.c:5875 [inline] shrink_node+0xab2/0x15a0 mm/vmscan.c:5908 shrink_zones mm/vmscan.c:6152 [inline] do_try_to_free_pages+0x3cc/0xca0 mm/vmscan.c:6214 try_to_free_mem_cgroup_pages+0x1eb/0x4e0 mm/vmscan.c:6529 try_charge_memcg+0x279/0xd10 mm/memcontrol.c:2783 obj_cgroup_charge_pages+0xbd/0x1d0 mm/memcontrol.c:3302 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:3328 __alloc_pages+0x1bc/0x360 mm/page_alloc.c:4592 alloc_pages_mpol+0xb1/0x1e0 mm/mempolicy.c:2264 alloc_pages+0xe1/0x100 mm/mempolicy.c:2335 vm_area_alloc_pages mm/vmalloc.c:3561 [inline] __vmalloc_area_node mm/vmalloc.c:3637 [inline] __vmalloc_node_range+0x6f2/0xee0 mm/vmalloc.c:3818 kvmalloc_node+0x121/0x170 mm/util.c:659 kvmalloc include/linux/slab.h:766 [inline] kvzalloc include/linux/slab.h:774 [inline] ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:255 hash_netiface_create+0x277/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1103 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2559 nfnetlink_rcv+0x170/0x13e0 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x5d3/0x6e0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:745 ____sys_sendmsg+0x312/0x410 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x1e9/0x280 net/socket.c:2667 __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2674 x64_sys_call+0xae9/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f value changed: 0x0000000100006793 -> 0x0000000100006794 Reported by Kernel Concurrency Sanitizer on: CPU: 1 PID: 26405 Comm: syz-executor.2 Tainted: G W 6.9.0-rc4-syzkaller-00329-g48cf398f15fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 ================================================================== syz-executor.2 invoked oom-killer: gfp_mask=0x402dc2(GFP_KERNEL_ACCOUNT|__GFP_HIGHMEM|__GFP_NOWARN|__GFP_ZERO), order=0, oom_score_adj=1000 CPU: 1 PID: 26405 Comm: syz-executor.2 Tainted: G W 6.9.0-rc4-syzkaller-00329-g48cf398f15fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xf2/0x150 lib/dump_stack.c:114 dump_stack+0x15/0x20 lib/dump_stack.c:123 dump_header+0x83/0x2d0 mm/oom_kill.c:462 oom_kill_process+0x33e/0x4c0 mm/oom_kill.c:1036 out_of_memory+0x9cb/0xc00 mm/oom_kill.c:1174 mem_cgroup_out_of_memory+0x13e/0x190 mm/memcontrol.c:1817 mem_cgroup_oom mm/memcontrol.c:2047 [inline] try_charge_memcg+0x752/0xd10 mm/memcontrol.c:2831 obj_cgroup_charge_pages+0xbd/0x1d0 mm/memcontrol.c:3302 __memcg_kmem_charge_page+0x9d/0x170 mm/memcontrol.c:3328 __alloc_pages+0x1bc/0x360 mm/page_alloc.c:4592 alloc_pages_mpol+0xb1/0x1e0 mm/mempolicy.c:2264 alloc_pages+0xe1/0x100 mm/mempolicy.c:2335 vm_area_alloc_pages mm/vmalloc.c:3561 [inline] __vmalloc_area_node mm/vmalloc.c:3637 [inline] __vmalloc_node_range+0x6f2/0xee0 mm/vmalloc.c:3818 kvmalloc_node+0x121/0x170 mm/util.c:659 kvmalloc include/linux/slab.h:766 [inline] kvzalloc include/linux/slab.h:774 [inline] ip_set_alloc+0x1f/0x30 net/netfilter/ipset/ip_set_core.c:255 hash_netiface_create+0x277/0x740 net/netfilter/ipset/ip_set_hash_gen.h:1568 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1103 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2559 nfnetlink_rcv+0x170/0x13e0 net/netfilter/nfnetlink.c:659 netlink_unicast_kernel net/netlink/af_netlink.c:1335 [inline] netlink_unicast+0x58d/0x660 net/netlink/af_netlink.c:1361 netlink_sendmsg+0x5d3/0x6e0 net/netlink/af_netlink.c:1905 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x140/0x180 net/socket.c:745 ____sys_sendmsg+0x312/0x410 net/socket.c:2584 ___sys_sendmsg net/socket.c:2638 [inline] __sys_sendmsg+0x1e9/0x280 net/socket.c:2667 __do_sys_sendmsg net/socket.c:2676 [inline] __se_sys_sendmsg net/socket.c:2674 [inline] __x64_sys_sendmsg+0x46/0x50 net/socket.c:2674 x64_sys_call+0xae9/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:47 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x1d0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fad3cef0ea9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fad3c26a0c8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007fad3d01ef80 RCX: 00007fad3cef0ea9 RDX: 0000000000000000 RSI: 0000000020000000 RDI: 0000000000000004 RBP: 00007fad3cf3d4a4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007fad3d01ef80 R15: 00007ffc32ffc318 memory: usage 307200kB, limit 307200kB, failcnt 11890 memory+swap: usage 307800kB, limit 9007199254740988kB, failcnt 0 kmem: usage 307160kB, limit 9007199254740988kB, failcnt 0 Memory cgroup stats for /syz2: cache 36864 rss 0 shmem 0 mapped_file 28672 dirty 0 writeback 0 workingset_refault_anon 53 workingset_refault_file 7 swap 614400 swapcached 4096 pgpgin 364298 pgpgout 364288 pgfault 422515 pgmajfault 86 inactive_anon 4096 active_anon 0 inactive_file 8192 active_file 0 unevictable 28672 hierarchical_memory_limit 314572800 hierarchical_memsw_limit 9223372036854771712 total_cache 36864 total_rss 0 total_shmem 0 total_mapped_file 28672 total_dirty 0 total_writeback 0 total_workingset_refault_anon 53 total_workingset_refault_file 7 total_swap 614400 total_swapcached 4096 total_pgpgin 364379 total_pgpgout 364369 total_pgfault 422585 total_pgmajfault 86 total_inactive_anon 4096 total_active_anon 0 total_inactive_file 8192 total_active_file 0 total_unevictable 28672 oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=syz2,mems_allowed=0,oom_memcg=/syz2,task_memcg=/syz2,task=syz-executor.2,pid=26404,uid=0 Memory cgroup out of memory: Killed process 26404 (syz-executor.2) total-vm:48532kB, anon-rss:508kB, file-rss:8832kB, shmem-rss:0kB, UID:0 pgtables:80kB oom_score_adj:1000