syzbot


KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64

Status: moderation: reported on 2023/12/09 00:03
Subsystems: kernel
[Documentation on labels]
Reported-by: syzbot+fb9027810f21adb900b7@syzkaller.appspotmail.com
First crash: 299d, last: 1h29m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in mem_cgroup_flush_stats_ratelimited / tick_do_update_jiffies64

read-write to 0xffffffff85c079c0 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:211 [inline]
 tick_nohz_highres_handler+0x7b/0x2c0 kernel/time/tick-sched.c:1512
 __run_hrtimer kernel/time/hrtimer.c:1689 [inline]
 __hrtimer_run_queues+0x210/0x5d0 kernel/time/hrtimer.c:1753
 hrtimer_interrupt+0x20d/0x7b0 kernel/time/hrtimer.c:1815
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1065 [inline]
 __sysvec_apic_timer_interrupt+0x52/0x190 arch/x86/kernel/apic/apic.c:1082
 sysvec_apic_timer_interrupt+0x32/0x80 arch/x86/kernel/apic/apic.c:1076
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649

read to 0xffffffff85c079c0 of 8 bytes by task 12871 on cpu 0:
 mem_cgroup_flush_stats_ratelimited+0x29/0xf0 mm/memcontrol.c:771
 count_shadow_nodes+0x69/0x3d0 mm/workingset.c:683
 do_shrink_slab+0x57/0x680 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:5869 [inline]
 shrink_node+0xb02/0x15d0 mm/vmscan.c:5902
 shrink_zones mm/vmscan.c:6141 [inline]
 do_try_to_free_pages+0x43d/0xce0 mm/vmscan.c:6203
 try_to_free_mem_cgroup_pages+0x1e2/0x480 mm/vmscan.c:6518
 try_charge_memcg+0x280/0xd20 mm/memcontrol.c:2782
 obj_cgroup_charge_pages+0xbd/0x1c0 mm/memcontrol.c:3301
 __memcg_kmem_charge_page+0x9c/0x170 mm/memcontrol.c:3327
 __alloc_pages+0x1bb/0x340 mm/page_alloc.c:4584
 alloc_pages_mpol+0xb1/0x1d0 mm/mempolicy.c:2133
 alloc_pages+0xe0/0x100 mm/mempolicy.c:2204
 vm_area_alloc_pages mm/vmalloc.c:3063 [inline]
 __vmalloc_area_node mm/vmalloc.c:3139 [inline]
 __vmalloc_node_range+0x6ee/0xec0 mm/vmalloc.c:3320
 kvmalloc_node+0x121/0x170 mm/util.c:642
 kvmalloc include/linux/slab.h:728 [inline]
 xt_alloc_table_info+0x3d/0x80 net/netfilter/x_tables.c:1192
 do_replace net/ipv4/netfilter/ip_tables.c:1122 [inline]
 do_ipt_set_ctl+0x62f/0x1740 net/ipv4/netfilter/ip_tables.c:1627
 nf_setsockopt+0x18d/0x1b0 net/netfilter/nf_sockopt.c:101
 ip_setsockopt+0xe6/0x100 net/ipv4/ip_sockglue.c:1420
 udp_setsockopt+0x95/0xa0 net/ipv4/udp.c:2783
 ipv6_setsockopt+0xfc/0x130 net/ipv6/ipv6_sockglue.c:987
 tcp_setsockopt+0x90/0xa0 net/ipv4/tcp.c:3734
 sock_common_setsockopt+0x61/0x70 net/core/sock.c:3715
 do_sock_setsockopt net/socket.c:2311 [inline]
 __sys_setsockopt+0x1d4/0x240 net/socket.c:2334
 __do_sys_setsockopt net/socket.c:2343 [inline]
 __se_sys_setsockopt net/socket.c:2340 [inline]
 __x64_sys_setsockopt+0x66/0x80 net/socket.c:2340
 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+0x63/0x6b

value changed: 0x0000000100024949 -> 0x000000010002494a

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12871 Comm: syz-executor.3 Not tainted 6.8.0-rc6-syzkaller-00250-g04b8076df253 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024
==================================================================

Crashes (108):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/03 12:02 upstream 04b8076df253 25905f5d .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/03/02 12:26 upstream 17ba56605bfd 25905f5d .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/03/01 10:19 upstream 87adedeba51a 352ab904 .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/02/29 13:59 upstream 805d849d7c3c 352ab904 .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/02/28 15:50 upstream cf1182944c7c 55d6f11d .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/02/27 21:38 upstream 45ec2f5f6ed3 d367cbe5 .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/02/27 08:46 upstream 45ec2f5f6ed3 05e69c83 .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/02/26 21:16 upstream d206a76d7d27 da36a36b .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/02/25 09:11 upstream ab0a97cffa0b 8d446f15 .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/02/24 21:57 upstream f2e367d6ad3b 8d446f15 .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/02/24 12:46 upstream 603c04e27c3e 8d446f15 .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/02/23 08:49 upstream ffd2cb6b718e 8d446f15 .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/02/23 02:54 upstream 1c892cdd8fe0 8d446f15 .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/02/22 15:57 upstream 39133352cbed 345111b5 .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/02/21 13:32 upstream 9fc1ccccfd8d 3af7dd65 .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/02/20 06:21 upstream b401b621758e 3af7dd65 .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/02/19 04:59 upstream b401b621758e 578f7538 .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/02/18 12:04 upstream c02197fc9076 578f7538 .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/02/17 23:13 upstream ced590523156 578f7538 .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/02/17 18:53 upstream c1ca10ceffbb 578f7538 .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/02/15 12:25 upstream 8d3dea210042 d9b1cdd5 .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/02/14 10:56 upstream 7e90b5c295ec d902085f .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/02/13 22:49 upstream c664e16bb1ba e66542d7 .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/02/13 04:15 upstream 716f4aaa7b48 77b23aa1 .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/02/12 05:12 upstream 841c35169323 77b23aa1 .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/02/11 17:57 upstream 7521f258ea30 77b23aa1 .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/02/11 10:05 upstream a5b6244cf87c 77b23aa1 .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/02/09 19:51 upstream e6f39a90de92 77b23aa1 .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/02/09 11:17 upstream 1f719a2f3fa6 7f07e9b0 .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/02/09 01:34 upstream 047371968ffc 7f07e9b0 .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/02/06 12:12 upstream 99bd3cb0d12e 6404acf9 .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/02/05 12:57 upstream 54be6c6c5ae8 e23e8c20 .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/02/02 22:05 upstream 021533194476 60bf9982 .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/02/02 03:47 upstream 5c24e4e9e708 d61103fc .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/02/01 22:47 upstream 5c24e4e9e708 81024119 .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/01/30 14:23 upstream 861c0981648f 7f400fcb .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/01/30 04:43 upstream 861c0981648f 991a98f4 .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/01/29 14:19 upstream 41bccc98fb79 991a98f4 .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/01/28 23:15 upstream 4854cf9c61d0 cc4a4020 .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/01/27 22:14 upstream cd2286fc5775 cc4a4020 .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/01/27 16:15 upstream 3a5879d495b2 cc4a4020 .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/01/26 06:19 upstream ecb1b8288dc7 cc4a4020 .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/01/24 21:22 upstream 443b349019f2 1e153dc8 .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/01/24 04:33 upstream 7ed2632ec7d7 1e153dc8 .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/01/23 11:53 upstream 5d9248eed480 1c0ecc51 .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/01/22 13:36 upstream 6613476e225e 9bd8dcda .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/01/22 00:18 upstream 4fbbed787267 9bd8dcda .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/01/21 12:25 upstream 7a396820222d 9bd8dcda .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/01/21 00:11 upstream 125514880ddd 9bd8dcda .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
2023/11/28 23:27 upstream 18d46e76d7c2 1adfb6f6 .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.