syzbot


KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush

Status: moderation: reported on 2024/02/11 11:36
Subsystems: cgroups mm
[Documentation on labels]
Reported-by: syzbot+19fc22693ef14439725b@syzkaller.appspotmail.com
First crash: 62d, last: 8h45m

Sample crash report:
==================================================================
BUG: KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush

write to 0xffff888237c344c0 of 4 bytes by task 39 on cpu 1:
 mem_cgroup_css_rstat_flush+0x4ea/0x540 mm/memcontrol.c:5848
 cgroup_rstat_flush_locked+0x848/0x980 kernel/cgroup/rstat.c:245
 cgroup_rstat_flush+0x26/0x40 kernel/cgroup/rstat.c:277
 do_flush_stats mm/memcontrol.c:745 [inline]
 flush_memcg_stats_dwork+0x50/0x90 mm/memcontrol.c:782
 process_one_work kernel/workqueue.c:3254 [inline]
 process_scheduled_works+0x465/0x990 kernel/workqueue.c:3335
 worker_thread+0x526/0x730 kernel/workqueue.c:3416
 kthread+0x1d1/0x210 kernel/kthread.c:388
 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

read-write to 0xffff888237c344c0 of 4 bytes by task 12795 on cpu 0:
 memcg_rstat_updated mm/memcontrol.c:725 [inline]
 __mod_memcg_lruvec_state+0x13a/0x1a0 mm/memcontrol.c:875
 __mod_lruvec_state+0x3c/0x50 mm/memcontrol.c:897
 __update_lru_size include/linux/mm_inline.h:47 [inline]
 update_lru_size include/linux/mm_inline.h:56 [inline]
 lruvec_add_folio include/linux/mm_inline.h:326 [inline]
 lru_add_fn+0x289/0x430 mm/swap.c:215
 folio_batch_move_lru+0x20c/0x2c0 mm/swap.c:233
 folio_batch_add_and_move mm/swap.c:249 [inline]
 folio_add_lru+0xd4/0x130 mm/swap.c:532
 folio_putback_lru mm/vmscan.c:818 [inline]
 reclaim_folio_list+0x145/0x1e0 mm/vmscan.c:2112
 reclaim_pages+0x227/0x290 mm/vmscan.c:2145
 madvise_cold_or_pageout_pte_range+0xaa0/0xb30 mm/madvise.c:527
 walk_pmd_range mm/pagewalk.c:143 [inline]
 walk_pud_range mm/pagewalk.c:221 [inline]
 walk_p4d_range mm/pagewalk.c:256 [inline]
 walk_pgd_range+0x80d/0xef0 mm/pagewalk.c:293
 __walk_page_range+0xc5/0x330 mm/pagewalk.c:395
 walk_page_range+0x2c5/0x400 mm/pagewalk.c:521
 madvise_pageout_page_range mm/madvise.c:586 [inline]
 madvise_pageout mm/madvise.c:613 [inline]
 madvise_vma_behavior mm/madvise.c:1032 [inline]
 madvise_walk_vmas mm/madvise.c:1261 [inline]
 do_madvise+0x1a38/0x2620 mm/madvise.c:1441
 __do_sys_madvise mm/madvise.c:1454 [inline]
 __se_sys_madvise mm/madvise.c:1452 [inline]
 __x64_sys_madvise+0x61/0x70 mm/madvise.c:1452
 x64_sys_call+0x2825/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:29
 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: 0x0000000a -> 0x00000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 12795 Comm: syz-executor.0 Not tainted 6.9.0-rc3-syzkaller-00355-g7efd0a74039f #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (196):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/04/13 19:48 upstream 7efd0a74039f c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/13 06:12 upstream 8f2c057754b2 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/12 16:56 upstream 5939d45155bb c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/12 15:12 upstream 586b5dfb51b9 c8349e48 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/12 04:06 upstream 586b5dfb51b9 27de0a5c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/11 16:12 upstream e8c39d0f57f3 95ed9ece .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/11 00:51 upstream 9875c0beb8ad 4320ec32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/10 11:45 upstream 2c71fdf02a95 4320ec32 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/10 09:11 upstream 2c71fdf02a95 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/09 19:30 upstream 20cb38a7af88 171ec371 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/09 17:38 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/09 02:02 upstream 20cb38a7af88 f3234354 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/08 13:28 upstream fec50db7033e 53df08b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/08 06:59 upstream fec50db7033e ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/07 18:13 upstream 9fe30842a90b ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/06 18:17 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/06 04:11 upstream 104db052b62d ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/05 14:28 upstream 8cb4a9a82b21 77230c29 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/05 00:29 upstream c88b9b4cde17 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/04 12:54 upstream c85af715cac0 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/04 09:21 upstream c85af715cac0 0ee3535e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/04 04:43 upstream c85af715cac0 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/03 15:25 upstream 3e92c1e6cd87 51c4dcff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/03 02:18 upstream b1e6ec0a0fd0 7925100d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/02 22:02 upstream b1e6ec0a0fd0 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/02 13:19 upstream 026e680b0a08 eb2966c4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/01 23:12 upstream 026e680b0a08 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/01 08:20 upstream 39cd87c4eb2b 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/04/01 08:16 upstream 39cd87c4eb2b 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/31 19:24 upstream 18737353cca0 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/31 04:51 upstream 712e14250dd2 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/30 14:47 upstream 486291a0e624 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/30 02:03 upstream 4535e1a4174c 6baf5069 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/29 21:40 upstream 4535e1a4174c c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/29 04:44 upstream 317c7bc0ef03 c52bcb23 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/29 03:26 upstream 317c7bc0ef03 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/28 14:10 upstream 8d025e2092e2 e91187ee .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/28 08:13 upstream 8d025e2092e2 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/27 18:53 upstream 498e47cd1d1f 120789fd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/27 17:22 upstream 498e47cd1d1f 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/26 22:57 upstream 7033999ecd7b 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/26 19:13 upstream 928a87efa423 454571b6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/26 01:32 upstream 928a87efa423 bcd9b39f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/25 11:36 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/25 10:01 upstream 4cece7649650 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/03/25 04:51 upstream 5e74df2f8f15 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
2024/02/11 11:35 upstream 7521f258ea30 77b23aa1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in __mod_memcg_lruvec_state / mem_cgroup_css_rstat_flush
* Struck through repros no longer work on HEAD.