syzbot


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

Status: auto-closed as invalid on 2021/06/15 20:49
Subsystems: fs
[Documentation on labels]
First crash: 1612d, last: 1612d
Similar bugs (3)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask (3) fs 6 1 1563d 1563d 0/29 auto-closed as invalid on 2021/08/03 17:56
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask (4) fs 6 4 1417d 1448d 0/29 auto-closed as invalid on 2021/12/27 21:31
upstream KCSAN: data-race in __fsnotify_parent / fsnotify_recalc_mask fs 6 1 1794d 1767d 0/29 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 0xffff8881018f2a6c of 4 bytes by task 5439 on cpu 1:
 __fsnotify_recalc_mask fs/notify/mark.c:132 [inline]
 fsnotify_recalc_mask+0x17d/0x200 fs/notify/mark.c:147
 fsnotify_add_mark_locked+0x80b/0xa10 fs/notify/mark.c:665
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:548 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:596 [inline]
 inotify_update_watch fs/notify/inotify/inotify_user.c:623 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:761 [inline]
 __se_sys_inotify_add_watch+0x537/0x670 fs/notify/inotify/inotify_user.c:704
 __x64_sys_inotify_add_watch+0x3f/0x50 fs/notify/inotify/inotify_user.c:704
 do_syscall_64+0x4a/0x90 arch/x86/entry/common.c:47
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff8881018f2a6c of 4 bytes by task 1776 on cpu 0:
 fsnotify_event_needs_parent fs/notify/fsnotify.c:163 [inline]
 __fsnotify_parent+0x11d/0x430 fs/notify/fsnotify.c:204
 fsnotify_parent include/linux/fsnotify.h:68 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_close include/linux/fsnotify.h:279 [inline]
 __fput+0x1a9/0x4e0 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:174 [inline]
 exit_to_user_mode_prepare+0x156/0x190 kernel/entry/common.c:208
 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline]
 syscall_exit_to_user_mode+0x20/0x40 kernel/entry/common.c:301
 do_syscall_64+0x56/0x90 arch/x86/entry/common.c:57
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 1776 Comm: syz-executor.1 Not tainted 5.13.0-rc1-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/05/11 20:48 upstream 88b06399c9c7 b3c3bb8e .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.