BUG: KCSAN: data-race in __fsnotify_parent / __fsnotify_recalc_mask write to 0xffff88813d575244 of 4 bytes by task 5616 on cpu 1: __fsnotify_recalc_mask+0x204/0x300 fs/notify/mark.c:174 fsnotify_recalc_mask fs/notify/mark.c:191 [inline] fsnotify_add_mark_locked+0x9c8/0xbd0 fs/notify/mark.c:730 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:784 [inline] inotify_new_watch fs/notify/inotify/inotify_user.c:621 [inline] inotify_update_watch fs/notify/inotify/inotify_user.c:648 [inline] __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:787 [inline] __se_sys_inotify_add_watch+0x66b/0x820 fs/notify/inotify/inotify_user.c:730 __x64_sys_inotify_add_watch+0x43/0x50 fs/notify/inotify/inotify_user.c:730 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd read to 0xffff88813d575244 of 4 bytes by task 3090 on cpu 0: fsnotify_event_needs_parent fs/notify/fsnotify.c:161 [inline] __fsnotify_parent+0x128/0x480 fs/notify/fsnotify.c:202 fsnotify_parent include/linux/fsnotify.h:77 [inline] fsnotify_file include/linux/fsnotify.h:101 [inline] fsnotify_open include/linux/fsnotify.h:332 [inline] do_dentry_open+0x9f3/0xae0 fs/open.c:985 vfs_open+0x4a/0x50 fs/open.c:1063 do_open fs/namei.c:3639 [inline] path_openat+0x17f2/0x1d10 fs/namei.c:3796 do_filp_open+0xf6/0x200 fs/namei.c:3823 do_sys_openat2+0xab/0x110 fs/open.c:1422 do_sys_open fs/open.c:1437 [inline] __do_sys_openat fs/open.c:1453 [inline] __se_sys_openat fs/open.c:1448 [inline] __x64_sys_openat+0xf3/0x120 fs/open.c:1448 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd value changed: 0x00000000 -> 0x00002008 Reported by Kernel Concurrency Sanitizer on: CPU: 0 PID: 3090 Comm: syz-executor.0 Not tainted 6.5.0-syzkaller-08894-gb97d64c72259 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023 ================================================================== EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000. EXT4-fs (loop0): unmounting filesystem 00000000-0000-0000-0000-000000000000.