syzbot


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

Status: moderation: reported on 2024/09/17 15:40
Subsystems: fs mm
[Documentation on labels]
Reported-by: syzbot+24987fa8cfbf43d20fe6@syzkaller.appspotmail.com
First crash: 64d, last: 23h51m
Similar bugs (5)
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 146d 146d 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 865d 865d 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 205d 349d 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 943d 943d 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 1774d 1774d 0/28 auto-closed as invalid on 2020/03/22 09:49

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

write to 0xffff888107f525d8 of 8 bytes by task 3968 on cpu 0:
 mem_cgroup_track_foreign_dirty_slowpath+0x3b3/0x440
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1624 [inline]
 folio_account_dirtied mm/page-writeback.c:2754 [inline]
 __folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2797
 mark_buffer_dirty+0x148/0x250 fs/buffer.c:1201
 __block_commit_write fs/buffer.c:2195 [inline]
 block_page_mkwrite+0x29c/0x3f0 fs/buffer.c:2639
 ext4_page_mkwrite+0x73d/0xb70 fs/ext4/inode.c:6180
 do_page_mkwrite mm/memory.c:3162 [inline]
 do_shared_fault mm/memory.c:5373 [inline]
 do_fault mm/memory.c:5435 [inline]
 do_pte_missing mm/memory.c:3965 [inline]
 handle_pte_fault mm/memory.c:5766 [inline]
 __handle_mm_fault mm/memory.c:5909 [inline]
 handle_mm_fault+0x12de/0x2aa0 mm/memory.c:6077
 do_user_addr_fault arch/x86/mm/fault.c:1338 [inline]
 handle_page_fault arch/x86/mm/fault.c:1481 [inline]
 exc_page_fault+0x3b9/0x650 arch/x86/mm/fault.c:1539
 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623

read to 0xffff888107f525d8 of 8 bytes by task 3969 on cpu 1:
 mem_cgroup_track_foreign_dirty_slowpath+0xdb/0x440 mm/memcontrol.c:3254
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1624 [inline]
 folio_account_dirtied mm/page-writeback.c:2754 [inline]
 __folio_mark_dirty+0x3f5/0x4e0 mm/page-writeback.c:2797
 mark_buffer_dirty+0x148/0x250 fs/buffer.c:1201
 __block_commit_write fs/buffer.c:2195 [inline]
 block_write_end+0x123/0x210 fs/buffer.c:2271
 ext4_da_do_write_end fs/ext4/inode.c:3011 [inline]
 ext4_da_write_end+0x20a/0x810 fs/ext4/inode.c:3086
 generic_perform_write+0x33c/0x4a0 mm/filemap.c:4071
 ext4_buffered_write_iter+0x1ea/0x370 fs/ext4/file.c:299
 ext4_file_write_iter+0x383/0xf20
 iter_file_splice_write+0x5f1/0x980 fs/splice.c:743
 do_splice_from fs/splice.c:941 [inline]
 direct_splice_actor+0x160/0x2c0 fs/splice.c:1164
 splice_direct_to_actor+0x302/0x670 fs/splice.c:1108
 do_splice_direct_actor fs/splice.c:1207 [inline]
 do_splice_direct+0xd7/0x150 fs/splice.c:1233
 do_sendfile+0x398/0x660 fs/read_write.c:1363
 __do_sys_sendfile64 fs/read_write.c:1424 [inline]
 __se_sys_sendfile64 fs/read_write.c:1410 [inline]
 __x64_sys_sendfile64+0x110/0x150 fs/read_write.c:1410
 x64_sys_call+0xfbd/0x2dc0 arch/x86/include/generated/asm/syscalls_64.h:41
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x00000000ffff9a0c -> 0x00000000ffff9a96

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 3969 Comm: syz.3.184 Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/30/2024
==================================================================

Crashes (3):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/11/20 06:47 upstream bf9aa14fc523 7d02db5a .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
2024/10/18 19:01 upstream 4d939780b705 666f77ed .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
2024/09/17 15:39 upstream a430d95c5efa c673ca06 .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.