syzbot


BUG: Dentry still in use [unmount of sysfs sysfs]

Status: fixed on 2019/07/10 21:40
Subsystems: kernfs
[Documentation on labels]
Fix commit: 1b0b9cc8d379 vfs: fsmount: add missing mntget()
First crash: 1776d, last: 1776d
Cause bisection: introduced by (bisect log) :
commit 9c8ad7a2ff0bfe58f019ec0abc1fb965114dde7d
Author: David Howells <dhowells@redhat.com>
Date: Thu May 16 11:52:27 2019 +0000

  uapi, x86: Fix the syscall numbering of the mount API syscalls [ver #2]

Crash: BUG: Dentry still in use [unmount of sysfs sysfs] (log)
Repro: C syz .config
  
Similar bugs (3)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
android-5-10 BUG: Dentry still in use [unmount of ext4 loop0] C error 63 877d 915d 0/2 closed as dup on 2021/10/28 13:08
android-5-10 BUG: Dentry still in use [unmount of sysfs sysfs] C error 4 913d 914d 0/2 closed as dup on 2021/10/28 13:08
android-54 BUG: Dentry still in use [unmount of sysfs sysfs] C 12 914d 1194d 0/2 auto-obsoleted due to no activity on 2023/04/23 14:00

Sample crash report:
IPVS: ftp: loaded support on port[0] = 21
BUG: Dentry 00000000adf7b3b1{i=1,n=/}  still in use (2) [unmount of sysfs sysfs]
WARNING: CPU: 1 PID: 8498 at fs/dcache.c:1529 umount_check fs/dcache.c:1520 [inline]
WARNING: CPU: 1 PID: 8498 at fs/dcache.c:1529 umount_check.cold+0xe9/0x10a fs/dcache.c:1510
Kernel panic - not syncing: panic_on_warn set ...
CPU: 1 PID: 8498 Comm: syz-executor799 Not tainted 5.2.0-rc4+ #33
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+0x172/0x1f0 lib/dump_stack.c:113
 panic+0x2cb/0x744 kernel/panic.c:219
 __warn.cold+0x20/0x4d kernel/panic.c:576
 report_bug+0x263/0x2b0 lib/bug.c:186
 fixup_bug arch/x86/kernel/traps.c:179 [inline]
 fixup_bug arch/x86/kernel/traps.c:174 [inline]
 do_error_trap+0x11b/0x200 arch/x86/kernel/traps.c:272
 do_invalid_op+0x37/0x50 arch/x86/kernel/traps.c:291
 invalid_op+0x14/0x20 arch/x86/entry/entry_64.S:986
RIP: 0010:umount_check fs/dcache.c:1529 [inline]
RIP: 0010:umount_check.cold+0xe9/0x10a fs/dcache.c:1510
Code: 89 ff e8 00 5c f0 ff 48 81 c3 68 06 00 00 45 89 e8 4c 89 e1 53 4d 8b 0f 4c 89 f2 4c 89 e6 48 c7 c7 00 00 76 87 e8 11 bd a1 ff <0f> 0b 58 e9 bd 2a ff ff e8 d0 5b f0 ff e9 29 ff ff ff 45 31 f6 e9
RSP: 0018:ffff8880844f7bb8 EFLAGS: 00010282
RAX: 0000000000000050 RBX: ffff888098f6b028 RCX: 0000000000000000
RDX: 0000000000000000 RSI: ffffffff815ac956 RDI: ffffed101089ef69
RBP: ffff8880844f7be8 R08: 0000000000000050 R09: ffff888099698e48
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88809d049e40
R13: 0000000000000002 R14: 0000000000000001 R15: ffffffff88c939e0
 d_walk+0x194/0x950 fs/dcache.c:1264
 do_one_tree+0x28/0x40 fs/dcache.c:1536
 shrink_dcache_for_umount+0x72/0x170 fs/dcache.c:1552
 generic_shutdown_super+0x6d/0x370 fs/super.c:443
 kill_anon_super+0x3e/0x60 fs/super.c:1137
 kernfs_kill_sb+0x165/0x1e3 fs/kernfs/mount.c:360
 sysfs_kill_sb+0x23/0x40 fs/sysfs/mount.c:87
 deactivate_locked_super+0x95/0x100 fs/super.c:331
 deactivate_super fs/super.c:362 [inline]
 deactivate_super+0x1b2/0x1d0 fs/super.c:358
 cleanup_mnt+0xbf/0x160 fs/namespace.c:1120
 __cleanup_mnt+0x16/0x20 fs/namespace.c:1127
 task_work_run+0x145/0x1c0 kernel/task_work.c:113
 tracehook_notify_resume include/linux/tracehook.h:185 [inline]
 exit_to_usermode_loop+0x273/0x2c0 arch/x86/entry/common.c:168
 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline]
 syscall_return_slowpath arch/x86/entry/common.c:279 [inline]
 do_syscall_64+0x58e/0x680 arch/x86/entry/common.c:304
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x400e80
Code: 01 f0 ff ff 0f 83 20 0c 00 00 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 83 3d 4d 18 2d 00 00 75 14 b8 03 00 00 00 0f 05 <48> 3d 01 f0 ff ff 0f 83 f4 0b 00 00 c3 48 83 ec 08 e8 5a 01 00 00
RSP: 002b:00007ffd650d86c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
RAX: 0000000000000000 RBX: 0000000000000005 RCX: 0000000000400e80
RDX: 00000000004409b9 RSI: 0000000000000000 RDI: 0000000000000004
RBP: 00000000004a2190 R08: 0000000000000100 R09: 0000000000000100
R10: 0000000000000100 R11: 0000000000000246 R12: 0000000000401f00
R13: 0000000000401f90 R14: 0000000000000000 R15: 0000000000000000
Kernel Offset: disabled
Rebooting in 86400 seconds..

Crashes (6):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2019/06/16 03:31 upstream e01e060fe00d 442206d7 .config console log report syz C ci-upstream-kasan-gce-root
2019/06/15 19:37 upstream 0011572c8830 442206d7 .config console log report syz C ci-upstream-kasan-gce
2019/06/15 19:31 upstream 0011572c8830 442206d7 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2019/06/15 17:30 upstream 0011572c8830 442206d7 .config console log report syz C ci-upstream-kasan-gce-smack-root
2019/06/15 19:48 upstream 0011572c8830 442206d7 .config console log report syz C ci-upstream-kasan-gce-386
2019/06/15 17:06 upstream 0011572c8830 442206d7 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.