Created
September 28, 2021 10:40
-
-
Save ryo/0eeea60004f5102990e9aa8e90d947f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cvs -q diff -u -a -p kern_exec.c | |
Index: kern_exec.c | |
=================================================================== | |
RCS file: /src/cvs/cvsroot-netbsd/src/sys/kern/kern_exec.c,v | |
retrieving revision 1.506 | |
diff -u -a -p -r1.506 kern_exec.c | |
--- kern_exec.c 11 Jun 2021 12:54:22 -0000 1.506 | |
+++ kern_exec.c 28 Sep 2021 03:56:37 -0000 | |
@@ -87,6 +87,7 @@ __KERNEL_RCSID(0, "$NetBSD: kern_exec.c, | |
#include <sys/acct.h> | |
#include <sys/atomic.h> | |
#include <sys/exec.h> | |
+#include <sys/futex.h> | |
#include <sys/ktrace.h> | |
#include <sys/uidinfo.h> | |
#include <sys/wait.h> | |
@@ -1204,6 +1205,12 @@ execve_runproc(struct lwp *l, struct exe | |
} | |
KDASSERT(p->p_nlwps == 1); | |
+ /* release futexes */ | |
+ if (__predict_false(l->l_robust_head != 0)) { | |
+ futex_release_all_lwp(l, l->l_lid); | |
+ l->l_robust_head = 0; | |
+ } | |
+ | |
/* Destroy any lwpctl info. */ | |
if (p->p_lwpctl != NULL) | |
lwp_ctl_exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment