syzbot


KCSAN: data-race in d_invalidate / fast_dput

Status: moderation: reported on 2024/02/05 16:14
Subsystems: fs
[Documentation on labels]
Reported-by: syzbot+b90e1920cb0516af822c@syzkaller.appspotmail.com
First crash: 68d, last: 21d

Sample crash report:
==================================================================
BUG: KCSAN: data-race in d_invalidate / fast_dput

write to 0xffff888106523f10 of 8 bytes by task 25584 on cpu 0:
 __d_drop fs/dcache.c:509 [inline]
 d_invalidate+0x59/0x1c0 fs/dcache.c:1585
 __lookup_slow+0x131/0x250 fs/namei.c:1684
 lookup_slow+0x3c/0x60 fs/namei.c:1709
 walk_component fs/namei.c:2004 [inline]
 link_path_walk+0x621/0x810 fs/namei.c:2331
 path_openat+0x1a1/0x1d80 fs/namei.c:3795
 do_filp_open+0xf7/0x200 fs/namei.c:3826
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1432
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

read to 0xffff888106523f10 of 8 bytes by task 2780 on cpu 1:
 hlist_bl_unhashed include/linux/list_bl.h:54 [inline]
 d_unhashed include/linux/dcache.h:347 [inline]
 retain_dentry fs/dcache.c:686 [inline]
 fast_dput+0x62/0x2b0 fs/dcache.c:782
 dput+0x24/0xd0 fs/dcache.c:839
 handle_mounts fs/namei.c:1553 [inline]
 step_into+0x21a/0x810 fs/namei.c:1842
 walk_component fs/namei.c:2010 [inline]
 link_path_walk+0x49d/0x810 fs/namei.c:2331
 path_openat+0x1a1/0x1d80 fs/namei.c:3795
 do_filp_open+0xf7/0x200 fs/namei.c:3826
 do_sys_openat2+0xab/0x120 fs/open.c:1406
 do_sys_open fs/open.c:1421 [inline]
 __do_sys_openat fs/open.c:1437 [inline]
 __se_sys_openat fs/open.c:1432 [inline]
 __x64_sys_openat+0xf3/0x120 fs/open.c:1432
 do_syscall_64+0xd3/0x1d0
 entry_SYSCALL_64_after_hwframe+0x6d/0x75

value changed: 0xffff88823780ecf0 -> 0x0000000000000000

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2780 Comm: udevd Not tainted 6.8.0-syzkaller-13161-gbfa8f18691ed #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024
==================================================================

Crashes (4):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/03/23 15:56 upstream bfa8f18691ed 0ea90952 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_invalidate / fast_dput
2024/03/21 23:08 upstream ebc9bee8814d 7a239ce7 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_invalidate / fast_dput
2024/02/24 15:09 upstream 603c04e27c3e 8d446f15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_invalidate / fast_dput
2024/02/05 16:14 upstream 54be6c6c5ae8 e23e8c20 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-kcsan-gce KCSAN: data-race in d_invalidate / fast_dput
* Struck through repros no longer work on HEAD.