syzbot


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

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

Sample crash report:
FAT-fs (loop2): bogus number of reserved sectors
FAT-fs (loop2): Can't find a valid FAT filesystem
==================================================================
BUG: KCSAN: data-race in fsnotify / fsnotify_recalc_mask

write to 0xffff888100e0d7e4 of 4 bytes by task 11101 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+0x81b/0xa30 fs/notify/mark.c:668
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:543 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:597 [inline]
 inotify_update_watch fs/notify/inotify/inotify_user.c:624 [inline]
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:762 [inline]
 __se_sys_inotify_add_watch+0x537/0x670 fs/notify/inotify/inotify_user.c:705
 __x64_sys_inotify_add_watch+0x3f/0x50 fs/notify/inotify/inotify_user.c:705
 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

read to 0xffff888100e0d7e4 of 4 bytes by task 11097 on cpu 1:
 fsnotify+0x181/0x1190 fs/notify/fsnotify.c:505
 __fsnotify_parent+0x2f3/0x430 fs/notify/fsnotify.c:232
 fsnotify_parent include/linux/fsnotify.h:68 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_perm+0x299/0x2e0 include/linux/fsnotify.h:115
 security_file_open+0x85/0x90 security/security.c:1593
 do_dentry_open+0x22f/0x830 fs/open.c:813
 vfs_open+0x43/0x50 fs/open.c:940
 do_open fs/namei.c:3367 [inline]
 path_openat+0x184e/0x20b0 fs/namei.c:3500
 do_filp_open+0xd9/0x1f0 fs/namei.c:3527
 do_sys_openat2+0xa3/0x250 fs/open.c:1187
 do_sys_open fs/open.c:1203 [inline]
 __do_sys_openat fs/open.c:1219 [inline]
 __se_sys_openat fs/open.c:1214 [inline]
 __x64_sys_openat+0xef/0x110 fs/open.c:1214
 do_syscall_64+0x34/0x50 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xae

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 11097 Comm: syz-executor.2 Not tainted 5.12.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/04/22 13:49 upstream 16fc44d6387e 33c28d03 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in fsnotify / fsnotify_recalc_mask
2021/04/04 16:45 upstream 2023a53bdf41 6a81331a .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.