svn commit: r358634 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Wed Mar 4 19:52:35 UTC 2020


Author: mjg
Date: Wed Mar  4 19:52:34 2020
New Revision: 358634
URL: https://svnweb.freebsd.org/changeset/base/358634

Log:
  execve: use LOCKSHARED when looking up the interpreter
  
  Reviewed by:	kib
  Differential Revision:	https://reviews.freebsd.org/D23956

Modified:
  head/sys/kern/kern_exec.c

Modified: head/sys/kern/kern_exec.c
==============================================================================
--- head/sys/kern/kern_exec.c	Wed Mar  4 19:52:00 2020	(r358633)
+++ head/sys/kern/kern_exec.c	Wed Mar  4 19:52:34 2020	(r358634)
@@ -648,8 +648,8 @@ interpret:
 		free(imgp->freepath, M_TEMP);
 		imgp->freepath = NULL;
 		/* set new name to that of the interpreter */
-		NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | FOLLOW | SAVENAME,
-		    UIO_SYSSPACE, imgp->interpreter_name, td);
+		NDINIT(&nd, LOOKUP, ISOPEN | LOCKLEAF | LOCKSHARED | FOLLOW |
+		    SAVENAME, UIO_SYSSPACE, imgp->interpreter_name, td);
 		args->fname = imgp->interpreter_name;
 		goto interpret;
 	}


More information about the svn-src-all mailing list