diff options
| author | 2018-07-13 09:25:22 +0000 | |
|---|---|---|
| committer | 2018-07-13 09:25:22 +0000 | |
| commit | 8b23add8c74b86d0da67de43302cf21b97b028be (patch) | |
| tree | f1c0090b4f820a76d34793eb08027661681a4d3c /sys/kern/vfs_subr.c | |
| parent | no longer interpret 0.192.168.4 in hosts(5) as 192.168.4/24 (diff) | |
| download | wireguard-openbsd-8b23add8c74b86d0da67de43302cf21b97b028be.tar.xz wireguard-openbsd-8b23add8c74b86d0da67de43302cf21b97b028be.zip | |
Unveiling unveil(2).
This brings unveil into the tree, disabled by default - Currently
this will return EPERM on all attempts to use it until we are
fully certain it is ready for people to start using, but this
now allows for others to do more tweaking and experimentation.
Still needs to send the unveil's across forks and execs before
fully enabling.
Many thanks to robert@ and deraadt@ for extensive testing.
ok deraadt@
Diffstat (limited to 'sys/kern/vfs_subr.c')
| -rw-r--r-- | sys/kern/vfs_subr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 353d94e3c76..fa9e541abec 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.276 2018/07/02 20:56:22 bluhm Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.277 2018/07/13 09:25:23 beck Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -722,6 +722,7 @@ vput(struct vnode *vp) } #endif vp->v_usecount--; + KASSERT(vp->v_usecount > 0 || vp->v_uvcount == 0); if (vp->v_usecount > 0) { VOP_UNLOCK(vp); return; @@ -1067,6 +1068,8 @@ vgonel(struct vnode *vp, struct proc *p) struct vnode *vq; struct vnode *vx; + KASSERT(vp->v_uvcount == 0); + /* * If a vgone (or vclean) is already in progress, * wait until it is done and return. |
