syzbot


KCSAN: data-race in drain_all_stock / try_charge_memcg (2)

Status: auto-obsoleted due to no activity on 2024/06/11 02:15
Subsystems: cgroups mm
[Documentation on labels]
Reported-by: syzbot+b09c782ee8ecf3b7ce5a@syzkaller.appspotmail.com
First crash: 1079d, last: 233d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in drain_all_stock / try_charge_memcg cgroups mm 1 1150d 1150d 0/28 auto-closed as invalid on 2021/12/07 05:48

Sample crash report:
Memory cgroup out of memory: Killed process 15052 (syz-executor.2) total-vm:46472kB, anon-rss:384kB, file-rss:8960kB, shmem-rss:0kB, UID:0 pgtables:80kB oom_score_adj:1000
==================================================================
BUG: KCSAN: data-race in drain_all_stock / try_charge_memcg

write to 0xffff888237d2b910 of 4 bytes by task 15077 on cpu 1:
 consume_stock mm/memcontrol.c:2323 [inline]
 try_charge_memcg+0xb2d/0xd10 mm/memcontrol.c:2744
 try_charge mm/memcontrol.c:2931 [inline]
 charge_memcg mm/memcontrol.c:7284 [inline]
 __mem_cgroup_charge+0x63/0x100 mm/memcontrol.c:7299
 mem_cgroup_charge include/linux/memcontrol.h:691 [inline]
 __filemap_add_folio+0xc6/0x6d0 mm/filemap.c:864
 filemap_add_folio+0x70/0x160 mm/filemap.c:947
 __filemap_get_folio+0x2f1/0x5b0 mm/filemap.c:1934
 pagecache_get_page+0x2a/0xa0 mm/folio-compat.c:93
 grab_cache_page_write_begin+0x2e/0x40 mm/folio-compat.c:103
 block_write_begin+0x31/0x170 fs/buffer.c:2209
 cont_write_begin+0x486/0x6b0 fs/buffer.c:2567
 fat_write_begin+0x61/0xf0 fs/fat/inode.c:230
 generic_perform_write+0x1d5/0x410 mm/filemap.c:3974
 __generic_file_write_iter+0xa1/0x120 mm/filemap.c:4069
 generic_file_write_iter+0x7d/0x1d0 mm/filemap.c:4095
 call_write_iter include/linux/fs.h:2110 [inline]
 new_sync_write fs/read_write.c:497 [inline]
 vfs_write+0x771/0x8e0 fs/read_write.c:590
 ksys_write+0xeb/0x1b0 fs/read_write.c:643
 __do_sys_write fs/read_write.c:655 [inline]
 __se_sys_write fs/read_write.c:652 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:652
 x64_sys_call+0x27b7/0x2d30 arch/x86/include/generated/asm/syscalls_64.h:2
 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 0xffff888237d2b910 of 4 bytes by task 15052 on cpu 0:
 drain_all_stock+0xd3/0x2e0 mm/memcontrol.c:2431
 try_charge_memcg+0x6bb/0xd10 mm/memcontrol.c:2791
 try_charge mm/memcontrol.c:2931 [inline]
 charge_memcg mm/memcontrol.c:7284 [inline]
 mem_cgroup_swapin_charge_folio+0x107/0x1a0 mm/memcontrol.c:7369
 __read_swap_cache_async+0x2b9/0x520 mm/swap_state.c:514
 swap_cluster_readahead+0x380/0x3f0 mm/swap_state.c:697
 swapin_readahead+0xe2/0x7a0 mm/swap_state.c:904
 do_swap_page+0x3bb/0x15f0 mm/memory.c:4048
 handle_pte_fault mm/memory.c:5303 [inline]
 __handle_mm_fault mm/memory.c:5441 [inline]
 handle_mm_fault+0x7fa/0x27e0 mm/memory.c:5606
 do_user_addr_fault arch/x86/mm/fault.c:1331 [inline]
 handle_page_fault arch/x86/mm/fault.c:1474 [inline]
 exc_page_fault+0x3eb/0x690 arch/x86/mm/fault.c:1532
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

value changed: 0x00000011 -> 0x0000000e

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 15052 Comm: syz-executor.2 Not tainted 6.9.0-rc7-syzkaller-00012-gdccb07f2914c #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024
==================================================================

Crashes (189):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/05/07 02:14 upstream dccb07f2914c fa7a5cf0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/04/23 06:52 upstream a2c63a3f3d68 36c961ad .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/04/07 10:53 upstream f2f80ac80987 ca620dd8 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/19 20:16 upstream d95fcdf4961d e104824c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/13 11:11 upstream 1f440397665f db5b7ff0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/11 20:01 upstream e8f897f4afef 6ee49f2e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/08 17:42 upstream 3aaa8ce7a335 8e75c913 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/06 20:17 upstream 5847c9777c30 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/06 10:01 upstream 29cd507cbec2 f39a7eed .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/03/02 23:03 upstream 5ad3cb0ed525 25905f5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/27 10:34 upstream 45ec2f5f6ed3 05e69c83 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/26 21:08 upstream d206a76d7d27 da36a36b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/23 03:36 upstream 1c892cdd8fe0 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/17 19:30 upstream c1ca10ceffbb 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/16 19:49 upstream 0f1dd5e91e2b 578f7538 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/15 02:43 upstream 8d3dea210042 d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/14 20:16 upstream 7e90b5c295ec d9b1cdd5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/13 15:51 upstream c664e16bb1ba e66542d7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/06 13:57 upstream 99bd3cb0d12e 6404acf9 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/02 01:46 upstream 5c24e4e9e708 d61103fc .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/02/01 01:47 upstream 6764c317b6bb 373b66cd .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/29 21:41 upstream 41bccc98fb79 991a98f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/28 10:35 upstream 8a696a29c690 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/27 10:23 upstream 3a5879d495b2 cc4a4020 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/22 15:14 upstream 6613476e225e 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/22 09:03 upstream 4fbbed787267 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/20 01:26 upstream 9d1694dc91ce 9bd8dcda .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/16 12:14 upstream 052d534373b7 2a7bcc7f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/13 07:35 upstream 052d534373b7 551587c1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/11 01:01 upstream ab27740f7665 04815ef1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/10 03:05 upstream 35f11a3710cd b438bd66 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/04 06:32 upstream ac865f00af29 28c42cff .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/01 13:12 upstream 610a9b8f49fb fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2024/01/01 08:05 upstream 2639772a11c8 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/28 06:31 upstream f5837722ffec fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/26 19:40 upstream fbafc3e621c3 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/24 12:42 upstream 861deac3b092 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/24 09:25 upstream 3f82f1c3a036 fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/23 17:46 upstream 5254c0cbc92d fb427a07 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/22 14:33 upstream 24e0d2e527a3 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/22 00:08 upstream 9a6b294ab496 4f9530a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/18 01:28 upstream 0e389834672c 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/14 03:33 upstream 5bd7ef53ffe5 3222d10c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/13 01:18 upstream eaadbbaaff74 ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/12 12:06 upstream 26aff849438c ebcad15c .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/09 08:11 upstream f2e8a57ee903 28b24332 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/05 21:17 upstream bee0e7762ad2 858d62d1 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/12/04 16:16 upstream 33cc938e65a9 f819d6f7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 18:02 upstream 3b47bc037bd4 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 13:47 upstream 18d46e76d7c2 6e78f9ce .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/29 00:21 upstream 18d46e76d7c2 1adfb6f6 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2023/11/27 03:31 upstream d2da77f431ac 5b429f39 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
2022/01/11 15:57 upstream fe8152b38d3a 1884f55a .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in drain_all_stock / try_charge_memcg
* Struck through repros no longer work on HEAD.