syzbot


KCSAN: data-race in file_update_time / inode_update_timestamps (4)

Status: moderation: reported on 2025/06/06 08:04
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+4ed3508d88cbcd42faf6@syzkaller.appspotmail.com
First crash: 2d02h, last: 2d02h
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in file_update_time / inode_update_timestamps (3) fs 1 60d 60d 0/28 auto-obsoleted due to no activity on 2025/06/03 16:36
upstream KCSAN: data-race in file_update_time / inode_update_timestamps (2) ext4 12 124d 244d 0/28 auto-obsoleted due to no activity on 2025/04/01 04:05
upstream KCSAN: data-race in file_update_time / inode_update_timestamps ext4 34 293d 491d 0/28 auto-obsoleted due to no activity on 2024/09/23 06:59

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

read to 0xffff88810464bb00 of 8 bytes by task 8052 on cpu 1:
 inode_get_mtime_sec include/linux/fs.h:1697 [inline]
 inode_get_mtime include/linux/fs.h:1707 [inline]
 inode_needs_update_time fs/inode.c:2284 [inline]
 file_update_time+0x6a/0x2b0 fs/inode.c:2331
 fault_dirty_shared_page+0xd9/0x3c0 mm/memory.c:3420
 do_shared_fault mm/memory.c:5702 [inline]
 do_fault mm/memory.c:5748 [inline]
 do_pte_missing mm/memory.c:4251 [inline]
 handle_pte_fault mm/memory.c:6089 [inline]
 __handle_mm_fault mm/memory.c:6232 [inline]
 handle_mm_fault+0x165d/0x2be0 mm/memory.c:6401
 faultin_page mm/gup.c:1186 [inline]
 __get_user_pages+0x1036/0x1fb0 mm/gup.c:1488
 __get_user_pages_locked mm/gup.c:1754 [inline]
 faultin_page_range+0x10f/0x5b0 mm/gup.c:1978
 madvise_populate mm/madvise.c:972 [inline]
 madvise_do_behavior+0x120/0x1f20 mm/madvise.c:1729
 do_madvise+0x103/0x190 mm/madvise.c:1824
 __do_sys_madvise mm/madvise.c:1833 [inline]
 __se_sys_madvise mm/madvise.c:1831 [inline]
 __x64_sys_madvise+0x64/0x80 mm/madvise.c:1831
 x64_sys_call+0x2455/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:29
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

write to 0xffff88810464bb00 of 8 bytes by task 8053 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1715 [inline]
 inode_update_timestamps+0x136/0x270 fs/inode.c:2022
 generic_update_time fs/inode.c:2057 [inline]
 inode_update_time fs/inode.c:2077 [inline]
 __file_update_time fs/inode.c:2305 [inline]
 file_update_time+0x20e/0x2b0 fs/inode.c:2335
 fault_dirty_shared_page+0xd9/0x3c0 mm/memory.c:3420
 do_shared_fault mm/memory.c:5702 [inline]
 do_fault mm/memory.c:5748 [inline]
 do_pte_missing mm/memory.c:4251 [inline]
 handle_pte_fault mm/memory.c:6089 [inline]
 __handle_mm_fault mm/memory.c:6232 [inline]
 handle_mm_fault+0x165d/0x2be0 mm/memory.c:6401
 faultin_page mm/gup.c:1186 [inline]
 __get_user_pages+0x1036/0x1fb0 mm/gup.c:1488
 __get_user_pages_locked mm/gup.c:1754 [inline]
 faultin_page_range+0x10f/0x5b0 mm/gup.c:1978
 madvise_populate mm/madvise.c:972 [inline]
 madvise_do_behavior+0x120/0x1f20 mm/madvise.c:1729
 do_madvise+0x103/0x190 mm/madvise.c:1824
 __do_sys_madvise mm/madvise.c:1833 [inline]
 __se_sys_madvise mm/madvise.c:1831 [inline]
 __x64_sys_madvise+0x64/0x80 mm/madvise.c:1831
 x64_sys_call+0x2455/0x2fb0 arch/x86/include/generated/asm/syscalls_64.h:29
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xd2/0x200 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

value changed: 0x000000006842a0c2 -> 0x000000006842a0c3

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 8053 Comm: syz.3.1823 Not tainted 6.15.0-syzkaller-12426-ge271ed52b344 #0 PREEMPT(voluntary) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/06 08:03 upstream e271ed52b344 6b6b5f21 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_update_time / inode_update_timestamps
* Struck through repros no longer work on HEAD.