syzbot


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

Status: moderation: reported on 2025/04/08 16:36
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+2f7a9fb1b6766445675a@syzkaller.appspotmail.com
First crash: 17d, last: 17d
Similar bugs (2)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in file_update_time / inode_update_timestamps (2) ext4 12 81d 201d 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 250d 448d 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

write to 0xffff88811897c6c4 of 4 bytes by task 17627 on cpu 1:
 inode_set_mtime_to_ts include/linux/fs.h:1706 [inline]
 inode_update_timestamps+0x139/0x250 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+0x219/0x2b0 fs/inode.c:2335
 fault_dirty_shared_page+0xd7/0x3b0 mm/memory.c:3329
 do_shared_fault mm/memory.c:5610 [inline]
 do_fault mm/memory.c:5656 [inline]
 do_pte_missing mm/memory.c:4160 [inline]
 handle_pte_fault mm/memory.c:5997 [inline]
 __handle_mm_fault mm/memory.c:6140 [inline]
 handle_mm_fault+0x154c/0x2e80 mm/memory.c:6309
 faultin_page mm/gup.c:1193 [inline]
 __get_user_pages+0xf4e/0x2340 mm/gup.c:1491
 __get_user_pages_locked mm/gup.c:1757 [inline]
 faultin_page_range+0x352/0x5d0 mm/gup.c:1981
 madvise_populate mm/madvise.c:965 [inline]
 madvise_do_behavior+0x10e/0x2530 mm/madvise.c:1693
 do_madvise mm/madvise.c:1782 [inline]
 __do_sys_madvise mm/madvise.c:1790 [inline]
 __se_sys_madvise mm/madvise.c:1788 [inline]
 __x64_sys_madvise+0xcb/0x100 mm/madvise.c:1788
 x64_sys_call+0x23b8/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:29
 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

read to 0xffff88811897c6c4 of 4 bytes by task 17628 on cpu 0:
 inode_get_mtime_nsec include/linux/fs.h:1692 [inline]
 inode_get_mtime include/linux/fs.h:1698 [inline]
 inode_needs_update_time fs/inode.c:2284 [inline]
 file_update_time+0x8b/0x2b0 fs/inode.c:2331
 fault_dirty_shared_page+0xd7/0x3b0 mm/memory.c:3329
 do_shared_fault mm/memory.c:5610 [inline]
 do_fault mm/memory.c:5656 [inline]
 do_pte_missing mm/memory.c:4160 [inline]
 handle_pte_fault mm/memory.c:5997 [inline]
 __handle_mm_fault mm/memory.c:6140 [inline]
 handle_mm_fault+0x154c/0x2e80 mm/memory.c:6309
 faultin_page mm/gup.c:1193 [inline]
 __get_user_pages+0xf4e/0x2340 mm/gup.c:1491
 __get_user_pages_locked mm/gup.c:1757 [inline]
 faultin_page_range+0x352/0x5d0 mm/gup.c:1981
 madvise_populate mm/madvise.c:965 [inline]
 madvise_do_behavior+0x10e/0x2530 mm/madvise.c:1693
 do_madvise mm/madvise.c:1782 [inline]
 __do_sys_madvise mm/madvise.c:1790 [inline]
 __se_sys_madvise mm/madvise.c:1788 [inline]
 __x64_sys_madvise+0xcb/0x100 mm/madvise.c:1788
 x64_sys_call+0x23b8/0x2e10 arch/x86/include/generated/asm/syscalls_64.h:29
 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: 0x236256a9 -> 0x23faed29

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 UID: 0 PID: 17628 Comm: syz.3.4930 Not tainted 6.15.0-rc1-syzkaller #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/08 16:35 upstream 0af2f6be1b42 a775275d .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.