syzbot


KCSAN: data-race in file_modified_flags / inode_update_timestamps (2)

Status: moderation: reported on 2024/10/27 14:11
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+aceb9194512bbc9aaba4@syzkaller.appspotmail.com
First crash: 39d, last: 39d
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in file_modified_flags / inode_update_timestamps ext4 1 192d 192d 0/28 auto-obsoleted due to no activity on 2024/07/02 00:41

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

write to 0xffff8881140060ec of 4 bytes by task 17800 on cpu 0:
 inode_set_mtime_to_ts include/linux/fs.h:1644 [inline]
 inode_update_timestamps+0x166/0x280 fs/inode.c:2001
 generic_update_time fs/inode.c:2036 [inline]
 inode_update_time fs/inode.c:2056 [inline]
 __file_update_time fs/inode.c:2245 [inline]
 file_update_time+0x220/0x2b0 fs/inode.c:2275
 fault_dirty_shared_page+0xde/0x340 mm/memory.c:3204
 do_shared_fault mm/memory.c:5378 [inline]
 do_fault mm/memory.c:5424 [inline]
 do_pte_missing mm/memory.c:3965 [inline]
 handle_pte_fault mm/memory.c:5755 [inline]
 __handle_mm_fault mm/memory.c:5898 [inline]
 handle_mm_fault+0x1370/0x2a80 mm/memory.c:6066
 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 0xffff8881140060ec of 4 bytes by task 17802 on cpu 1:
 inode_get_mtime_nsec include/linux/fs.h:1630 [inline]
 inode_get_mtime include/linux/fs.h:1636 [inline]
 inode_needs_update_time fs/inode.c:2224 [inline]
 file_modified_flags+0xe0/0x330 fs/inode.c:2310
 file_modified+0x17/0x20 fs/inode.c:2332
 shmem_fallocate+0x80a/0x860 mm/shmem.c:3529
 vfs_fallocate+0x368/0x3b0 fs/open.c:333
 ksys_fallocate fs/open.c:356 [inline]
 __do_sys_fallocate fs/open.c:364 [inline]
 __se_sys_fallocate fs/open.c:362 [inline]
 __x64_sys_fallocate+0x79/0xc0 fs/open.c:362
 x64_sys_call+0x2783/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:286
 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: 0x06acdd0a -> 0x0739b3ba

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 UID: 0 PID: 17802 Comm: syz.3.3798 Tainted: G        W          6.12.0-rc4-syzkaller-00261-g850925a8133c #0
Tainted: [W]=WARN
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/27 14:10 upstream 850925a8133c 65e8686b .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in file_modified_flags / inode_update_timestamps
* Struck through repros no longer work on HEAD.