syzbot


KCSAN: data-race in fsnotify / fsnotify_recalc_mask (3)

Status: auto-closed as invalid on 2021/10/27 22:47
Subsystems: fs
[Documentation on labels]
First crash: 943d, last: 943d
Similar bugs (4)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in fsnotify / fsnotify_recalc_mask (4) fs 1 897d 897d 0/26 auto-closed as invalid on 2021/12/12 11:17
upstream KCSAN: data-race in fsnotify / fsnotify_recalc_mask fs 1 1373d 1373d 0/26 auto-closed as invalid on 2020/08/23 22:37
upstream KCSAN: data-race in fsnotify / fsnotify_recalc_mask (5) fs 1 715d 715d 0/26 auto-closed as invalid on 2022/06/12 08:27
upstream KCSAN: data-race in fsnotify / fsnotify_recalc_mask (2) fs 2 1096d 1114d 0/26 auto-closed as invalid on 2021/05/27 13:51

Sample crash report:
==================================================================
BUG: KCSAN: data-race in fsnotify / fsnotify_recalc_mask

write to 0xffff888101d0058c of 4 bytes by task 9639 on cpu 0:
 __fsnotify_recalc_mask fs/notify/mark.c:132 [inline]
 fsnotify_recalc_mask+0x17d/0x200 fs/notify/mark.c:147
 fsnotify_add_mark_locked+0xa57/0xc70 fs/notify/mark.c:694
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:548 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:601 [inline]
 inotify_update_watch fs/notify/inotify/inotify_user.c:628 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:766 [inline]
 __se_sys_inotify_add_watch+0x548/0x680 fs/notify/inotify/inotify_user.c:709
 __x64_sys_inotify_add_watch+0x3f/0x50 fs/notify/inotify/inotify_user.c:709
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x44/0xa0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101d0058c of 4 bytes by task 379 on cpu 1:
 fsnotify+0x181/0x11a0 fs/notify/fsnotify.c:505
 __fsnotify_parent+0x304/0x440 fs/notify/fsnotify.c:232
 fsnotify_parent include/linux/fsnotify.h:77 [inline]
 fsnotify_file include/linux/fsnotify.h:99 [inline]
 fsnotify_close include/linux/fsnotify.h:288 [inline]
 __fput+0x1d7/0x520 fs/file_table.c:266
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0xae/0x130 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:209
 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:302
 do_syscall_64+0x50/0xa0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000 -> 0x0000a008

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 379 Comm: systemd-udevd Not tainted 5.15.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/09/22 22:45 upstream cf1d2c3e7e2f 8cac236e .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in fsnotify / fsnotify_recalc_mask
* Struck through repros no longer work on HEAD.