syzbot


KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (7)

Status: upstream: reported on 2025/04/01 09:40
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+6f43371b62882ee50909@syzkaller.appspotmail.com
First crash: 3d06h, last: 3d06h
Discussions (1)
Title Replies (including bot) Last reply
[syzbot] [fs?] [mm?] KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (7) 0 (1) 2025/04/01 09:40
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (5) fs mm 1 280d 280d 0/28 auto-obsoleted due to no activity on 2024/08/02 02:51
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (3) fs mm 1 999d 999d 0/28 auto-closed as invalid on 2022/08/13 15:03
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (4) fs mm 128 339d 483d 0/28 auto-obsoleted due to no activity on 2024/06/03 11:30
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (2) fs mm 1 1077d 1077d 0/28 auto-closed as invalid on 2022/05/27 17:05
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath cgroups mm 1 1909d 1909d 0/28 auto-closed as invalid on 2020/03/22 09:49
upstream KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath (6) fs mm 6 61d 198d 0/28 auto-obsoleted due to no activity on 2025/03/29 19:42

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

write to 0xffff8881184b45d8 of 8 bytes by task 15048 on cpu 0:
 mem_cgroup_track_foreign_dirty_slowpath+0x3bf/0x450 mm/memcontrol.c:-1
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1586 [inline]
 folio_account_dirtied mm/page-writeback.c:2756 [inline]
 __folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2797
 mark_buffer_dirty+0x134/0x230 fs/buffer.c:1196
 __block_commit_write fs/buffer.c:2189 [inline]
 block_page_mkwrite+0x29b/0x3f0 fs/buffer.c:2621
 ext4_page_mkwrite+0x75c/0xba0 fs/ext4/inode.c:6225
 do_page_mkwrite mm/memory.c:3253 [inline]
 wp_page_shared mm/memory.c:3654 [inline]
 do_wp_page+0xcaf/0x2380 mm/memory.c:3804
 handle_pte_fault mm/memory.c:5906 [inline]
 __handle_mm_fault mm/memory.c:6033 [inline]
 handle_mm_fault+0xc78/0x2b30 mm/memory.c:6202
 do_user_addr_fault arch/x86/mm/fault.c:1337 [inline]
 handle_page_fault arch/x86/mm/fault.c:1480 [inline]
 exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1538
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffff8881184b45d8 of 8 bytes by task 15063 on cpu 1:
 mem_cgroup_track_foreign_dirty_slowpath+0xdb/0x450 mm/memcontrol.c:3291
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1586 [inline]
 folio_account_dirtied mm/page-writeback.c:2756 [inline]
 __folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2797
 mark_buffer_dirty+0x134/0x230 fs/buffer.c:1196
 __block_commit_write fs/buffer.c:2189 [inline]
 block_write_end+0x123/0x210 fs/buffer.c:2265
 ext4_da_do_write_end fs/ext4/inode.c:3015 [inline]
 ext4_da_write_end+0x20a/0x810 fs/ext4/inode.c:3090
 generic_perform_write+0x31e/0x4b0 mm/filemap.c:4135
 ext4_buffered_write_iter+0x1ed/0x3c0 fs/ext4/file.c:299
 ext4_file_write_iter+0x3b2/0xf80 include/linux/fs.h:-1
 iter_file_splice_write+0x5f2/0x980 fs/splice.c:738
 do_splice_from fs/splice.c:935 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1158
 splice_direct_to_actor+0x305/0x680 fs/splice.c:1102
 do_splice_direct_actor fs/splice.c:1201 [inline]
 do_splice_direct+0xd9/0x150 fs/splice.c:1227
 do_sendfile+0x40a/0x690 fs/read_write.c:1368
 __do_sys_sendfile64 fs/read_write.c:1429 [inline]
 __se_sys_sendfile64 fs/read_write.c:1415 [inline]
 __x64_sys_sendfile64+0x113/0x160 fs/read_write.c:1415
 x64_sys_call+0xfc3/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000ffffebe1 -> 0x00000000ffffef33

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 15063 Comm: syz.2.3982 Not tainted 6.14.0-syzkaller-11144-g1e7857b28020 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/04/01 04:33 upstream 1e7857b28020 36d76a97 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in mem_cgroup_track_foreign_dirty_slowpath / mem_cgroup_track_foreign_dirty_slowpath
* Struck through repros no longer work on HEAD.