summaryrefslogtreecommitdiffstats
path: root/sys/kern/exec_script.c
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2019-07-15 04:11:03 +0000
committervisa <visa@openbsd.org>2019-07-15 04:11:03 +0000
commit8994f64af411fc832c7f1ee3934cc414321f1e81 (patch)
tree1661d715021b879f81d9287839e05c7488543130 /sys/kern/exec_script.c
parentsync (diff)
downloadwireguard-openbsd-8994f64af411fc832c7f1ee3934cc414321f1e81.tar.xz
wireguard-openbsd-8994f64af411fc832c7f1ee3934cc414321f1e81.zip
Do not relock fdp in fdrelease(). This prevents unnecessary locking
in the common case. OK mpi@
Diffstat (limited to 'sys/kern/exec_script.c')
-rw-r--r--sys/kern/exec_script.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/exec_script.c b/sys/kern/exec_script.c
index 788260254f5..a31fa5a3269 100644
--- a/sys/kern/exec_script.c
+++ b/sys/kern/exec_script.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exec_script.c,v 1.47 2018/06/18 09:15:05 mpi Exp $ */
+/* $OpenBSD: exec_script.c,v 1.48 2019/07/15 04:11:03 visa Exp $ */
/* $NetBSD: exec_script.c,v 1.13 1996/02/04 02:15:06 christos Exp $ */
/*
@@ -260,8 +260,8 @@ fail:
if (epp->ep_flags & EXEC_HASFD) {
epp->ep_flags &= ~EXEC_HASFD;
fdplock(p->p_fd);
+ /* fdrelease() unlocks p->p_fd. */
(void) fdrelease(p, epp->ep_fd);
- fdpunlock(p->p_fd);
} else
vn_close(scriptvp, FREAD, p->p_ucred, p);