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: 21d, last: 21d
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 103d 103d 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 822d 822d 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 162d 306d 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 900d 900d 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 1731d 1731d 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 0xffff8881150e9530 of 8 bytes by task 6917 on cpu 1:
 mem_cgroup_track_foreign_dirty_slowpath+0x3b3/0x440
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1583 [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:2194 [inline]
 block_page_mkwrite+0x29c/0x3f0 fs/buffer.c:2638
 ext4_page_mkwrite+0x73a/0xb70 fs/ext4/inode.c:6150
 do_page_mkwrite mm/memory.c:3159 [inline]
 do_shared_fault mm/memory.c:5150 [inline]
 do_fault mm/memory.c:5212 [inline]
 do_pte_missing mm/memory.c:3964 [inline]
 handle_pte_fault mm/memory.c:5538 [inline]
 __handle_mm_fault mm/memory.c:5681 [inline]
 handle_mm_fault+0x135a/0x2a20 mm/memory.c:5849
 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 0xffff8881150e9530 of 8 bytes by task 6920 on cpu 0:
 mem_cgroup_track_foreign_dirty_slowpath+0xdb/0x440 mm/memcontrol.c:3288
 mem_cgroup_track_foreign_dirty include/linux/memcontrol.h:1583 [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:2194 [inline]
 block_write_end+0x123/0x210 fs/buffer.c:2270
 ext4_da_do_write_end fs/ext4/inode.c:3029 [inline]
 ext4_da_write_end+0x1ff/0x7e0 fs/ext4/inode.c:3101
 generic_perform_write+0x33c/0x4a0 mm/filemap.c:4040
 ext4_buffered_write_iter+0x1ea/0x370 fs/ext4/file.c:299
 ext4_file_write_iter+0x293/0xe10
 new_sync_write fs/read_write.c:590 [inline]
 vfs_write+0x76a/0x910 fs/read_write.c:683
 ksys_write+0xeb/0x1b0 fs/read_write.c:736
 __do_sys_write fs/read_write.c:748 [inline]
 __se_sys_write fs/read_write.c:745 [inline]
 __x64_sys_write+0x42/0x50 fs/read_write.c:745
 x64_sys_call+0x27dd/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:2
 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: 0x00000000ffffaf96 -> 0x00000000ffffaffe

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 6920 Comm: syz.4.600 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
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.