syzbot


KCSAN: data-race in __fsnotify_parent / vfs_unlink (3)

Status: auto-closed as invalid on 2021/03/11 07:42
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+6ef76135150a50f5158f@syzkaller.appspotmail.com
First crash: 1202d, last: 1139d
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 1250d 1270d 0/26 auto-closed as invalid on 2020/11/19 20:53
upstream KCSAN: data-race in __fsnotify_parent / vfs_unlink (4) fs 6 1021d 1101d 0/26 auto-closed as invalid on 2021/07/07 08:07
upstream KCSAN: data-race in __fsnotify_parent / vfs_unlink fs 2 1470d 1483d 0/26 auto-closed as invalid on 2020/05/19 08:17

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

write to 0xffff88812be3c3c0 of 4 bytes by task 1609 on cpu 0:
 dont_mount include/linux/dcache.h:355 [inline]
 vfs_unlink+0x271/0x3c0 fs/namei.c:3837
 do_unlinkat+0x28a/0x4d0 fs/namei.c:3899
 __do_sys_unlink fs/namei.c:3945 [inline]
 __se_sys_unlink fs/namei.c:3943 [inline]
 __x64_sys_unlink+0x2c/0x30 fs/namei.c:3943
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

read to 0xffff88812be3c3c0 of 4 bytes by task 9826 on cpu 1:
 __fsnotify_parent+0x7d/0x430 fs/notify/fsnotify.c:187
 fsnotify_parent include/linux/fsnotify.h:68 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_access include/linux/fsnotify.h:247 [inline]
 vfs_read+0x35f/0x5d0 fs/read_write.c:500
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 9826 Comm: systemd-udevd Not tainted 5.11.0-rc6-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: 1 PID: 9826 Comm: systemd-udevd Not tainted 5.11.0-rc6-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:79 [inline]
 dump_stack+0x116/0x15d lib/dump_stack.c:120
 panic+0x1e7/0x5fa kernel/panic.c:231
 kcsan_report+0x67b/0x680 kernel/kcsan/report.c:634
 kcsan_setup_watchpoint+0x472/0x4d0 kernel/kcsan/core.c:568
 __fsnotify_parent+0x7d/0x430 fs/notify/fsnotify.c:187
 fsnotify_parent include/linux/fsnotify.h:68 [inline]
 fsnotify_file include/linux/fsnotify.h:90 [inline]
 fsnotify_access include/linux/fsnotify.h:247 [inline]
 vfs_read+0x35f/0x5d0 fs/read_write.c:500
 ksys_read+0xce/0x180 fs/read_write.c:634
 __do_sys_read fs/read_write.c:644 [inline]
 __se_sys_read fs/read_write.c:642 [inline]
 __x64_sys_read+0x3e/0x50 fs/read_write.c:642
 do_syscall_64+0x39/0x80 arch/x86/entry/common.c:46
 entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x7effbe593910
Code: b6 fe ff ff 48 8d 3d 0f be 08 00 48 83 ec 08 e8 06 db 01 00 66 0f 1f 44 00 00 83 3d f9 2d 2c 00 00 75 10 b8 00 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 de 9b 01 00 48 89 04 24
RSP: 002b:00007fff4dc804c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000560d8e8be8a0 RCX: 00007effbe593910
RDX: 0000000000001000 RSI: 0000560d8e8bebf0 RDI: 000000000000000f
RBP: 0000000000000d68 R08: 00007effbe852228 R09: 0000000000001010
R10: 0000000000000030 R11: 0000000000000246 R12: 00007effbe84e440
R13: 00007effbe84d900 R14: 0000560d8e8c3860 R15: 00007effbe84d900
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2021/02/04 07:41 upstream 3afe9076a7c1 624dad51 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / vfs_unlink
2021/02/03 11:38 upstream 3aaf0a27ffc2 624dad51 .config console log report info ci2-upstream-kcsan-gce KCSAN: data-race in __fsnotify_parent / vfs_unlink
2021/01/06 11:16 upstream 9f1abbe97c08 fff20c29 .config console log report info ci2-upstream-kcsan-gce
2020/12/02 16:42 upstream 509a15421674 eff43e99 .config console log report info ci2-upstream-kcsan-gce
* Struck through repros no longer work on HEAD.