syzbot


KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask (4)

Status: auto-closed as invalid on 2021/12/27 21:31
Subsystems: fs
[Documentation on labels]
First crash: 1194d, last: 1162d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask (3) fs 1 1308d 1308d 0/28 auto-closed as invalid on 2021/08/03 17:56
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask (2) fs 1 1357d 1357d 0/28 auto-closed as invalid on 2021/06/15 20:49
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask fs 1 1539d 1512d 0/28 auto-closed as invalid on 2020/12/21 11:59

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

write to 0xffff888101e3389c of 4 bytes by task 1678 on cpu 1:
 __fsnotify_recalc_mask fs/notify/mark.c:132 [inline]
 fsnotify_recalc_mask+0x17d/0x1e0 fs/notify/mark.c:147
 fsnotify_add_mark_locked+0x9fa/0xbc0 fs/notify/mark.c:694
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:626 [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+0x53b/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/0xd0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888101e3389c of 4 bytes by task 1838 on cpu 0:
 fsnotify_event_needs_parent fs/notify/fsnotify.c:163 [inline]
 __fsnotify_parent+0x12f/0x490 fs/notify/fsnotify.c:204
 fsnotify_parent include/linux/fsnotify.h:77 [inline]
 fsnotify_file include/linux/fsnotify.h:99 [inline]
 fsnotify_close include/linux/fsnotify.h:301 [inline]
 __fput+0x1d7/0x520 fs/file_table.c:266
 ____fput+0x11/0x20 fs/file_table.c:313
 task_work_run+0x8e/0x110 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+0x160/0x190 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:300
 do_syscall_64+0x50/0xd0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae

value changed: 0x00000000 -> 0x00002008

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1838 Comm: syz-executor.4 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/11/22 21:29 upstream 136057256686 545ab074 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask
2021/11/05 07:31 upstream d4439a1189f9 4c1be0be .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask
2021/10/23 06:09 upstream 9c0c4d24ac00 282f03fb .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask
2021/10/22 00:54 upstream 2f111a6fd5b5 55f90bc6 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask
* Struck through repros no longer work on HEAD.