syzbot


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

Status: auto-closed as invalid on 2020/05/06 06:05
Subsystems: fs
[Documentation on labels]
First crash: 2199d, last: 2119d
Similar bugs (2)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fsnotify_recalc_mask / fsnotify (3) fs 6 1 1185d 1185d 0/29 auto-obsoleted due to no activity on 2022/10/21 23:59
upstream KCSAN: data-race in __fsnotify_recalc_mask / fsnotify fs 6 1 2229d 2229d 0/29 closed as invalid on 2019/11/19 14:04

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

write to 0xffff88812b3e318c of 4 bytes by task 12507 on cpu 0:
 __fsnotify_recalc_mask+0x152/0x1b0 fs/notify/mark.c:132
 fsnotify_recalc_mask.part.0+0x28/0x90 fs/notify/mark.c:147
 fsnotify_recalc_mask fs/notify/mark.c:143 [inline]
 fsnotify_add_mark_locked+0x791/0xa20 fs/notify/mark.c:664
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:466 [inline]
 inotify_new_watch fs/notify/inotify/inotify_user.c:590 [inline]
 inotify_update_watch+0x343/0x3c0 fs/notify/inotify/inotify_user.c:617
 __do_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:755 [inline]
 __se_sys_inotify_add_watch fs/notify/inotify/inotify_user.c:698 [inline]
 __x64_sys_inotify_add_watch+0x1f8/0x250 fs/notify/inotify/inotify_user.c:698
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88812b3e318c of 4 bytes by task 14386 on cpu 1:
 fsnotify+0x17f/0x7d0 fs/notify/fsnotify.c:352
 fsnotify_path include/linux/fsnotify.h:54 [inline]
 fsnotify_path include/linux/fsnotify.h:47 [inline]
 fsnotify_perm include/linux/fsnotify.h:85 [inline]
 security_file_open+0x188/0x210 security/security.c:1533
 do_dentry_open+0x211/0x970 fs/open.c:784
 vfs_open+0x62/0x80 fs/open.c:914
 do_last fs/namei.c:3490 [inline]
 path_openat+0xe32/0x3150 fs/namei.c:3607
 do_filp_open+0x11e/0x1b0 fs/namei.c:3637
 do_sys_openat2+0x4f5/0x620 fs/open.c:1149
 do_sys_open+0xa3/0x110 fs/open.c:1165
 ksys_open include/linux/syscalls.h:1386 [inline]
 __do_sys_open fs/open.c:1171 [inline]
 __se_sys_open fs/open.c:1169 [inline]
 __x64_sys_open+0x55/0x70 fs/open.c:1169
 do_syscall_64+0xcc/0x3a0 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 14386 Comm: syz-executor.3 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/26 06:02 https://github.com/google/ktsan.git kcsan 766d004d1b85 4f588111 .config console log report ci2-upstream-kcsan-gce
2020/01/29 20:46 https://github.com/google/ktsan.git kcsan 245a43005292 5ed23f9a .config console log report ci2-upstream-kcsan-gce
2020/01/28 17:45 https://github.com/google/ktsan.git kcsan 245a43005292 c8e81ce4 .config console log report ci2-upstream-kcsan-gce
2020/01/20 19:18 https://github.com/google/ktsan.git kcsan 245a43005292 c40da18c .config console log report ci2-upstream-kcsan-gce
2019/12/08 06:28 https://github.com/google/ktsan.git kcsan ef798c30ba4e 1508f453 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.