Print dangling vnode before panic() to help debug.
PR kern/57775 ""panic: unmount: dangling vnode" while umounting procfs"
This commit is contained in:
parent
f0cc90c163
commit
ca4932dc6d
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_mount.c,v 1.103 2023/12/28 12:48:08 hannken Exp $ */
|
||||
/* $NetBSD: vfs_mount.c,v 1.104 2024/01/17 10:17:29 hannken Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997-2020 The NetBSD Foundation, Inc.
|
||||
|
@ -67,7 +67,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.103 2023/12/28 12:48:08 hannken Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.104 2024/01/17 10:17:29 hannken Exp $");
|
||||
|
||||
#include "veriexec.h"
|
||||
|
||||
|
@ -936,7 +936,7 @@ err_mounted:
|
|||
int
|
||||
dounmount(struct mount *mp, int flags, struct lwp *l)
|
||||
{
|
||||
vnode_t *coveredvp;
|
||||
vnode_t *coveredvp, *vp;
|
||||
int error, async, used_syncer, used_extattr;
|
||||
const bool was_suspended = fstrans_is_owner(mp);
|
||||
|
||||
|
@ -1003,8 +1003,10 @@ dounmount(struct mount *mp, int flags, struct lwp *l)
|
|||
vfs_resume(mp);
|
||||
|
||||
mountlist_remove(mp);
|
||||
if (TAILQ_FIRST(&mp->mnt_vnodelist) != NULL)
|
||||
if ((vp = VIMPL_TO_VNODE(TAILQ_FIRST(&mp->mnt_vnodelist))) != NULL) {
|
||||
vprint("dangling", vp);
|
||||
panic("unmount: dangling vnode");
|
||||
}
|
||||
vfs_hooks_unmount(mp);
|
||||
|
||||
vfs_set_lowermount(mp, NULL);
|
||||
|
|
Loading…
Reference in New Issue