syzbot


KCSAN: data-race in __fsnotify_parent / vfs_unlink

Status: auto-closed as invalid on 2020/05/19 08:17
Subsystems: fs
[Documentation on labels]
First crash: 1533d, last: 1519d
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream KCSAN: data-race in __fsnotify_parent / vfs_unlink (2) fs 2 1299d 1320d 0/26 auto-closed as invalid on 2020/11/19 20:53
upstream KCSAN: data-race in __fsnotify_parent / vfs_unlink (3) fs 4 1188d 1247d 0/26 auto-closed as invalid on 2021/03/11 07:42
upstream KCSAN: data-race in __fsnotify_parent / vfs_unlink (4) fs 6 1070d 1150d 0/26 auto-closed as invalid on 2021/07/07 08:07

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

write to 0xffff8880adf1d180 of 4 bytes by task 24822 on cpu 1:
 dont_mount include/linux/dcache.h:352 [inline]
 vfs_unlink+0x267/0x3e0 fs/namei.c:4075
 do_unlinkat+0x33f/0x550 fs/namei.c:4137
 __do_sys_unlink fs/namei.c:4184 [inline]
 __se_sys_unlink fs/namei.c:4182 [inline]
 __x64_sys_unlink+0x38/0x50 fs/namei.c:4182
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff8880adf1d180 of 4 bytes by task 24812 on cpu 0:
 __fsnotify_parent+0x55/0x230 fs/notify/fsnotify.c:155
 fsnotify_parent include/linux/fsnotify.h:40 [inline]
 fsnotify_path include/linux/fsnotify.h:50 [inline]
 fsnotify_modify include/linux/fsnotify.h:256 [inline]
 vfs_write fs/read_write.c:560 [inline]
 vfs_write+0x32b/0x380 fs/read_write.c:542
 ksys_write+0xc5/0x1a0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x49/0x60 fs/read_write.c:620
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 0 PID: 24812 Comm: syz-executor.0 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
==================================================================
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 24812 Comm: syz-executor.0 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x11d/0x187 lib/dump_stack.c:118
 panic+0x210/0x640 kernel/panic.c:221
 kcsan_report.cold+0xc/0x14 kernel/kcsan/report.c:609
 kcsan_setup_watchpoint+0x3e3/0x420 kernel/kcsan/core.c:503
 __fsnotify_parent+0x55/0x230 fs/notify/fsnotify.c:155
 fsnotify_parent include/linux/fsnotify.h:40 [inline]
 fsnotify_path include/linux/fsnotify.h:50 [inline]
 fsnotify_modify include/linux/fsnotify.h:256 [inline]
 vfs_write fs/read_write.c:560 [inline]
 vfs_write+0x32b/0x380 fs/read_write.c:542
 ksys_write+0xc5/0x1a0 fs/read_write.c:611
 __do_sys_write fs/read_write.c:623 [inline]
 __se_sys_write fs/read_write.c:620 [inline]
 __x64_sys_write+0x49/0x60 fs/read_write.c:620
 do_syscall_64+0xc7/0x390 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x45c4a9
Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007f5b271a9c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f5b271aa6d4 RCX: 000000000045c4a9
RDX: 000000000d4ba0ff RSI: 00000000200009c0 RDI: 0000000000000003
RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff
R13: 0000000000000ce2 R14: 00000000004cecc3 R15: 000000000076bf2c
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/03/10 08:15 https://github.com/google/ktsan.git kcsan 941e0d917bbf 35f53e45 .config console log report ci2-upstream-kcsan-gce
2020/02/25 11:38 https://github.com/google/ktsan.git kcsan 766d004d1b85 59b57593 .config console log report ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.