syzbot


KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64 (2)

Status: moderation: reported on 2024/08/30 11:59
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+ced4d9a8cadb5ef3adae@syzkaller.appspotmail.com
First crash: 98d, last: 1h10m
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64 kernel 334 137d 364d 0/28 auto-obsoleted due to no activity on 2024/08/19 05:50

Sample crash report:
oom-kill:constraint=CONSTRAINT_MEMCG,nodemask=(null),cpuset=/,mems_allowed=0,oom_memcg=/syz3,task_memcg=/syz3,task=syz.3.9329,pid=9557,uid=0
Memory cgroup out of memory: Killed process 9557 (syz.3.9329) total-vm:95328kB, anon-rss:616kB, file-rss:22472kB, shmem-rss:0kB, UID:0 pgtables:128kB oom_score_adj:1000
==================================================================
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 1:
 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
 __rcu_read_unlock+0x0/0x70 kernel/rcu/tree_plugin.h:419
 rcu_read_unlock include/linux/rcupdate.h:882 [inline]
 mod_memcg_page_state include/linux/memcontrol.h:940 [inline]
 __vmalloc_area_node mm/vmalloc.c:3676 [inline]
 __vmalloc_node_range_noprof+0xa7a/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:261
 hash_netiface_create+0x273/0x730 net/netfilter/ipset/ip_set_hash_gen.h:1568
 ip_set_create+0x359/0x8a0 net/netfilter/ipset/ip_set_core.c:1109
 nfnetlink_rcv_msg+0x4a9/0x570 net/netfilter/nfnetlink.c:302
 netlink_rcv_skb+0x12c/0x230 net/netlink/af_netlink.c:2542
 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 8143 on cpu 0:
 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_charge+0x29/0xb0 mm/memcontrol.c:4512
 mem_cgroup_charge include/linux/memcontrol.h:646 [inline]
 filemap_add_folio+0x53/0x1b0 mm/filemap.c:966
 __filemap_get_folio+0x2f1/0x5b0 mm/filemap.c:1959
 filemap_fault+0x46d/0xb30 mm/filemap.c:3354
 __do_fault+0xb6/0x200 mm/memory.c:4907
 do_read_fault mm/memory.c:5322 [inline]
 do_fault mm/memory.c:5456 [inline]
 do_pte_missing mm/memory.c:3979 [inline]
 handle_pte_fault mm/memory.c:5801 [inline]
 __handle_mm_fault mm/memory.c:5944 [inline]
 handle_mm_fault+0xe98/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: 0x000000010000365b -> 0x000000010000365c

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 8143 Comm: syz-executor Not tainted 6.13.0-rc1-syzkaller-00239-g9a6e8c7c3a02 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (84):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/12/06 23:31 upstream 9a6e8c7c3a02 9ac0fdc6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/06 09:48 upstream b8f52214c61a 946d28f0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/05 19:33 upstream 5076001689e4 29f61fce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/04 11:34 upstream feffde684ac2 b50eb251 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/03 20:00 upstream ceb8bf2ceaa7 578925bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/03 05:26 upstream cdd30ebb1b9f 578925bc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/02 22:39 upstream e70140ba0d2b b499ea68 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/12/01 23:42 upstream f788b5ef1ca9 68914665 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/29 18:11 upstream 7af08b57bcb9 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/28 02:29 upstream 7d4050728c83 5df23865 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/26 11:59 upstream 2c22dc1ee3a1 e9a9a9f2 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/26 05:30 upstream 2c22dc1ee3a1 11dbc254 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/26 01:40 upstream 9f16d5e6f220 11dbc254 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/24 15:29 upstream 9f16d5e6f220 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/23 23:44 upstream 42d9e8b7ccdd 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/23 05:37 upstream 06afb0f36106 68da6d95 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/22 04:34 upstream 28eb75e178d3 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/21 01:43 upstream 8f7c8b88bda4 4b25d554 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/20 14:19 upstream bf9aa14fc523 4fca1650 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/19 17:44 upstream 158f238aa69d 7d02db5a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/19 03:54 upstream 23acd177540d 571351cb .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/18 07:18 upstream adc218676eef cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/17 21:31 upstream 4a5df3796467 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/16 05:01 upstream f868cd251776 cfe3a04a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/12 11:33 upstream 2d5404caa8c7 75bb1b32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/11 03:39 upstream a9cda7c0ffed 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/09 08:05 upstream da4373fbcf00 6b856513 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/07 23:21 upstream ff7afaeca1a1 867e44df .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/06 09:15 upstream 2e1b3cc9d7f7 3a465482 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/05 03:09 upstream 557329bcecc2 509da429 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/11/02 04:51 upstream 6c52d4da1c74 f00eed24 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/31 23:53 upstream 0fc810ae3ae1 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/31 11:24 upstream 4236f913808c 96eb609f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/26 09:06 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/25 09:24 upstream 4e46774408d9 c79b8ca5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/23 02:13 upstream c2ee9f594da8 15fa2979 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/22 09:33 upstream d12937763990 a93682b3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/22 02:02 upstream d12937763990 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/21 16:37 upstream 42f7652d3eb5 f1e4447c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/18 12:24 upstream 4d939780b705 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/18 00:03 upstream 6efbea77b390 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/17 05:45 upstream c964ced77262 666f77ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/16 16:06 upstream 2f87d0916ce0 bde2d81c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/15 13:29 upstream eca631b8fe80 7eb57b4a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/10/15 07:57 upstream eca631b8fe80 b01b6661 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/22 21:34 upstream af9c191ac2a0 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/22 15:24 upstream 88264981f208 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/21 12:59 upstream 1868f9d0260e 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/20 17:02 upstream baeb9a7d8b60 6f888b75 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/19 15:31 upstream 839c4f596f89 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/18 14:42 upstream bdf56c7580d2 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/16 22:42 upstream adfc3ded5c33 c673ca06 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/14 12:46 upstream b7718454f937 c7e35043 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/08 00:22 upstream d1f2d51b711a 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/07 06:52 upstream b31c44928842 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/07 02:31 upstream b831f83e40a2 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/07 02:26 upstream b831f83e40a2 9750182a .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/06 13:45 upstream b831f83e40a2 464ac2ed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/02 09:21 upstream c9f016e72b5c 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/09/01 09:29 upstream e8784b0aef62 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/08/31 12:29 upstream 1934261d8974 1eda0d14 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
2024/08/30 11:58 upstream 20371ba12063 ee2602b8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64
* Struck through repros no longer work on HEAD.