syzbot


KCSAN: data-race in __d_instantiate / fsnotify_recalc_mask

Status: auto-closed as invalid on 2022/03/27 13:55
Subsystems: fs
[Documentation on labels]
First crash: 793d, last: 793d

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

write to 0xffff8881524bd90c of 4 bytes by task 17256 on cpu 0:
 __fsnotify_recalc_mask fs/notify/mark.c:132 [inline]
 fsnotify_recalc_mask+0x154/0x1b0 fs/notify/mark.c:147
 fsnotify_add_mark_locked+0x9fa/0xbc0 fs/notify/mark.c:696
 fsnotify_add_inode_mark_locked include/linux/fsnotify_backend.h:637 [inline]
 fcntl_dirnotify+0x375/0x6b0 fs/notify/dnotify/dnotify.c:335
 do_fcntl+0x40d/0xc10 fs/fcntl.c:422
 __do_sys_fcntl fs/fcntl.c:472 [inline]
 __se_sys_fcntl+0xc6/0x180 fs/fcntl.c:457
 __x64_sys_fcntl+0x3f/0x50 fs/fcntl.c:457
 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 0xffff8881524bd90c of 4 bytes by task 17251 on cpu 1:
 fsnotify_inode_watches_children include/linux/fsnotify_backend.h:513 [inline]
 fsnotify_update_flags include/linux/fsnotify_backend.h:535 [inline]
 __d_instantiate+0x27a/0x3a0 fs/dcache.c:2010
 d_instantiate_new+0x58/0xe0 fs/dcache.c:2054
 ext4_add_nondir+0x11a/0x140 fs/ext4/namei.c:2714
 ext4_create+0x1bf/0x2a0 fs/ext4/namei.c:2754
 lookup_open fs/namei.c:3330 [inline]
 open_last_lookups fs/namei.c:3400 [inline]
 path_openat+0xc79/0x1f30 fs/namei.c:3606
 do_filp_open+0x105/0x220 fs/namei.c:3636
 do_sys_openat2+0xb5/0x2b0 fs/open.c:1214
 do_sys_open fs/open.c:1230 [inline]
 __do_sys_open fs/open.c:1238 [inline]
 __se_sys_open fs/open.c:1234 [inline]
 __x64_sys_open+0xe2/0x110 fs/open.c:1234
 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

value changed: 0x00000000 -> 0x280003c5

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 17251 Comm: syz-executor.5 Not tainted 5.17.0-rc4-syzkaller-00229-g4f12b742eb2b-dirty #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
2022/02/20 13:52 upstream 4f12b742eb2b 3cd800e4 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __d_instantiate / fsnotify_recalc_mask
* Struck through repros no longer work on HEAD.