Date: Sat, 14 Sep 2019 13:33:36 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r352329 - stable/12/sys/kern Message-ID: <201909141333.x8EDXaYY039667@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Sep 14 13:33:36 2019 New Revision: 352329 URL: https://svnweb.freebsd.org/changeset/base/352329 Log: MFC r352017: In do_execve(), use shared text vnode lock consistently. 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 Sat Sep 14 13:32:54 2019 (r352328) +++ stable/12/sys/kern/kern_exec.c Sat Sep 14 13:33:36 2019 (r352329) @@ -528,7 +528,7 @@ interpret: euip = uifind(attr.va_uid); change_euid(imgp->newcred, euip); } - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); if (attr.va_mode & S_ISGID) change_egid(imgp->newcred, attr.va_gid); /* @@ -557,7 +557,7 @@ interpret: oldcred->cr_svgid != oldcred->cr_gid) { VOP_UNLOCK(imgp->vp, 0); imgp->newcred = crdup(oldcred); - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); change_svuid(imgp->newcred, imgp->newcred->cr_uid); change_svgid(imgp->newcred, imgp->newcred->cr_gid); } @@ -574,7 +574,7 @@ interpret: if (vn_fullpath(td, imgp->vp, &imgp->execpath, &imgp->freepath) != 0) imgp->execpath = args->fname; - vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY); + vn_lock(imgp->vp, LK_SHARED | LK_RETRY); } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909141333.x8EDXaYY039667>