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: 365d, last: 3d02h
Similar bugs (1)
Kernel Title Rank 🛈 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 6 334 404d 630d 0/29 auto-obsoleted due to no activity on 2024/08/19 05:50

Sample crash report:
==================================================================
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:1761 [inline]
 __hrtimer_run_queues+0x20c/0x5a0 kernel/time/hrtimer.c:1825
 hrtimer_interrupt+0x21a/0x460 kernel/time/hrtimer.c:1887
 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline]
 __sysvec_apic_timer_interrupt+0x5c/0x1d0 arch/x86/kernel/apic/apic.c:1056
 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
 sysvec_apic_timer_interrupt+0x6f/0x80 arch/x86/kernel/apic/apic.c:1050
 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
 is_atomic kernel/kcsan/core.c:249 [inline]
 should_watch kernel/kcsan/core.c:277 [inline]
 check_access kernel/kcsan/core.c:752 [inline]
 __tsan_read4+0xe9/0x190 kernel/kcsan/core.c:1024
 shrink_node_memcgs mm/vmscan.c:6058 [inline]
 shrink_node+0x6f5/0x2120 mm/vmscan.c:6092
 shrink_zones mm/vmscan.c:6336 [inline]
 do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6398
 try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6726
 try_charge_memcg+0x358/0x9e0 mm/memcontrol.c:2357
 try_charge mm/memcontrol.c:2499 [inline]
 charge_memcg+0x51/0xc0 mm/memcontrol.c:4702
 __mem_cgroup_charge+0x28/0xb0 mm/memcontrol.c:4719
 mem_cgroup_charge include/linux/memcontrol.h:654 [inline]
 filemap_add_folio+0x4e/0x1b0 mm/filemap.c:964
 __filemap_get_folio+0x31e/0x6b0 mm/filemap.c:1991
 filemap_fault+0x41f/0xb40 mm/filemap.c:3455
 __do_fault+0xb9/0x200 mm/memory.c:5152
 do_read_fault mm/memory.c:5573 [inline]
 do_fault mm/memory.c:5707 [inline]
 do_pte_missing mm/memory.c:4234 [inline]
 handle_pte_fault mm/memory.c:6052 [inline]
 __handle_mm_fault mm/memory.c:6195 [inline]
 handle_mm_fault+0xf78/0x2c20 mm/memory.c:6364
 faultin_page mm/gup.c:1144 [inline]
 __get_user_pages+0x102e/0x1fa0 mm/gup.c:1446
 __get_user_pages_locked mm/gup.c:1712 [inline]
 get_dump_page+0xb5/0x250 mm/gup.c:2212
 dump_user_range+0x145/0x8f0 fs/coredump.c:1364
 elf_core_dump+0x1e00/0x1f90 fs/binfmt_elf.c:2085
 coredump_write+0xb0d/0xe30 fs/coredump.c:1049
 vfs_coredump+0x142f/0x20c0 fs/coredump.c:1168
 get_signal+0xd85/0xf70 kernel/signal.c:3019
 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:40 [inline]
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 irqentry_exit_to_user_mode+0x5e/0xa0 kernel/entry/common.c:73
 irqentry_exit+0x12/0x50 kernel/entry/common.c:177
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffffffff868099c0 of 8 bytes by task 6704 on cpu 1:
 mem_cgroup_flush_stats_ratelimited+0x29/0x70 mm/memcontrol.c:634
 count_shadow_nodes+0x6a/0x230 mm/workingset.c:678
 do_shrink_slab+0x60/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:6053 [inline]
 shrink_node+0x6c3/0x2120 mm/vmscan.c:6092
 shrink_zones mm/vmscan.c:6336 [inline]
 do_try_to_free_pages+0x3f6/0xcd0 mm/vmscan.c:6398
 try_to_free_mem_cgroup_pages+0x1ab/0x410 mm/vmscan.c:6726
 try_charge_memcg+0x358/0x9e0 mm/memcontrol.c:2357
 try_charge mm/memcontrol.c:2499 [inline]
 charge_memcg+0x51/0xc0 mm/memcontrol.c:4702
 __mem_cgroup_charge+0x28/0xb0 mm/memcontrol.c:4719
 mem_cgroup_charge include/linux/memcontrol.h:654 [inline]
 filemap_add_folio+0x4e/0x1b0 mm/filemap.c:964
 __filemap_get_folio+0x31e/0x6b0 mm/filemap.c:1991
 filemap_fault+0x41f/0xb40 mm/filemap.c:3455
 __do_fault+0xb9/0x200 mm/memory.c:5152
 do_read_fault mm/memory.c:5573 [inline]
 do_fault mm/memory.c:5707 [inline]
 do_pte_missing mm/memory.c:4234 [inline]
 handle_pte_fault mm/memory.c:6052 [inline]
 __handle_mm_fault mm/memory.c:6195 [inline]
 handle_mm_fault+0xf78/0x2c20 mm/memory.c:6364
 faultin_page mm/gup.c:1144 [inline]
 __get_user_pages+0x102e/0x1fa0 mm/gup.c:1446
 __get_user_pages_locked mm/gup.c:1712 [inline]
 get_dump_page+0xb5/0x250 mm/gup.c:2212
 dump_user_range+0x145/0x8f0 fs/coredump.c:1364
 elf_core_dump+0x1e00/0x1f90 fs/binfmt_elf.c:2085
 coredump_write+0xb0d/0xe30 fs/coredump.c:1049
 vfs_coredump+0x142f/0x20c0 fs/coredump.c:1168
 get_signal+0xd85/0xf70 kernel/signal.c:3019
 arch_do_signal_or_restart+0x96/0x480 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:40 [inline]
 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline]
 irqentry_exit_to_user_mode+0x5e/0xa0 kernel/entry/common.c:73
 irqentry_exit+0x12/0x50 kernel/entry/common.c:177
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x00000000ffffb44d -> 0x00000000ffffb44e

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 6704 Comm: syz.6.924 Tainted: G        W           syzkaller #0 PREEMPT(voluntary) 
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
==================================================================

Crashes (365):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/08/27 17:11 upstream fab1beda7597 e12e5ba4 .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
2025/08/26 06:52 upstream fab1beda7597 bf27483f .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
2025/08/24 20:14 upstream 69fd6b99b8f8 bf27483f .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
2025/08/23 23:15 upstream 8d245acc1e88 bf27483f .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
2025/08/23 15:52 upstream 6debb6904172 bf27483f .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
2025/08/21 02:47 upstream 41cd3fd15263 0b9605c8 .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
2025/08/18 21:17 upstream c17b750b3ad9 1804e95e .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
2025/08/17 13:01 upstream 99bade344cfa 1804e95e .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
2025/08/17 01:01 upstream 90d970cade8e 1804e95e .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
2025/08/16 16:39 upstream dfd4b508c8c6 1804e95e .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
2025/08/15 10:06 upstream 24ea63ea3877 1804e95e .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
2025/08/12 10:03 upstream 53e760d89498 c06e8995 .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
2025/08/11 21:04 upstream 8f5ae30d69d7 c06e8995 .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
2025/08/11 06:30 upstream 8f5ae30d69d7 32a0e5ed .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
2025/08/08 19:52 upstream 37816488247d 32a0e5ed .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
2025/08/06 11:50 upstream 6bcdbd62bd56 ffe1dd46 .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
2025/08/05 11:45 upstream 7e161a991ea7 37880f40 .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
2025/08/04 07:20 upstream 352af6a011d5 7368264b .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
2025/08/02 18:43 upstream a6923c06a3b2 7368264b .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
2025/08/02 05:55 upstream 0905809b38bd 7368264b .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
2025/07/30 14:40 upstream 4b290aae788e f8f2b4da .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
2025/07/28 22:14 upstream 038d61fd6422 6654ea9c .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
2025/07/28 11:45 upstream 038d61fd6422 fb8f743d .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
2025/07/28 07:59 upstream b711733e89a3 fb8f743d .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
2025/07/27 09:50 upstream ec2df4364666 fb8f743d .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
2025/07/26 23:21 upstream 302f88ff3584 fb8f743d .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
2025/07/25 20:40 upstream 2942242dde89 fb8f743d .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
2025/07/25 03:02 upstream 94ce1ac2c9b4 fb8f743d .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
2025/07/23 22:57 upstream 01a412d06bc5 0c1d6ded .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
2025/07/23 09:45 upstream 89be9a83ccf1 e1dd4f22 .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
2025/07/22 17:02 upstream 89be9a83ccf1 8e9d1dc1 .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
2025/07/21 04:37 upstream 89be9a83ccf1 7117feec .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
2025/07/20 16:53 upstream f4a40a4282f4 7117feec .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
2025/07/20 11:56 upstream bf61759db409 7117feec .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
2025/07/19 22:00 upstream 4871b7cb27f4 7117feec .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
2025/07/19 08:32 upstream d786aba32000 7117feec .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
2025/07/18 09:10 upstream 6832a9317eee 88248e14 .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
2025/07/17 21:52 upstream e2291551827f 0d1223f1 .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
2025/07/16 13:38 upstream 155a3c003e55 124ec9cc .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
2025/07/15 05:23 upstream 155a3c003e55 03fcfc4b .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
2025/07/14 13:27 upstream 347e9f5043c8 d8fc7335 .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
2025/07/14 00:22 upstream 5d5d62298b8b 3cda49cf .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
2025/07/13 08:51 upstream 3f31a806a62e 3cda49cf .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
2025/07/11 21:34 upstream 40f92e79b0aa 3cda49cf .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
2025/07/11 10:33 upstream bc9ff192a6c9 3cda49cf .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
2025/07/10 01:11 upstream 8c2e52ebbe88 f4e5e155 .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.