Author: kib
Date: Mon Feb 11 07:09:02 2019
New Revision: 343997
URL: https://svnweb.freebsd.org/changeset/base/343997

Log:
  MFC r343890:
  do_execve(): lock vnode when needed.

Modified:
  stable/12/sys/kern/kern_exec.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/kern_exec.c
==============================================================================
--- stable/12/sys/kern/kern_exec.c      Mon Feb 11 05:39:38 2019        
(r343996)
+++ stable/12/sys/kern/kern_exec.c      Mon Feb 11 07:09:02 2019        
(r343997)
@@ -696,8 +696,10 @@ interpret:
        else
                error = suword(--stack_base, imgp->args->argc) == 0 ?
                    0 : EFAULT;
-       if (error != 0)
+       if (error != 0) {
+               vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
                goto exec_fail_dealloc;
+       }
 
        if (args->fdp != NULL) {
                /* Install a brand new file descriptor table. */
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to