summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-08 09:21:11 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2019-07-08 09:21:11 +0000
commit9767c765439f088707cd5df90bd57d2e8c5089e3 (patch)
tree1118e6609ac8e40fbfefffe8962384119f11a808 /sys/kern
parent6f1dd8f20174b7d17b2f59e934f3f1f182c86649 (diff)
When an unlink failed due to unveil, the use count of the inode was
not decremented. You could not unmount the file system anymore. A vput(9) in namei(9) fixes this. OK deraadt@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/vfs_lookup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index a57f6f99915..f8bdbefaa11 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_lookup.c,v 1.77 2019/05/13 22:55:27 beck Exp $ */
+/* $OpenBSD: vfs_lookup.c,v 1.78 2019/07/08 09:21:10 bluhm Exp $ */
/* $NetBSD: vfs_lookup.c,v 1.17 1996/02/09 19:00:59 christos Exp $ */
/*
@@ -262,7 +262,7 @@ fail:
if ((cnp->cn_flags & LOCKPARENT) &&
(cnp->cn_flags & ISLASTCN) &&
(ndp->ni_vp != ndp->ni_dvp))
- VOP_UNLOCK(ndp->ni_dvp);
+ vput(ndp->ni_dvp);
if (ndp->ni_vp) {
if ((cnp->cn_flags & LOCKLEAF))
vput(ndp->ni_vp);