Fixed bug introduced in the previous commit - the lock must be held until

after the call to exec_check_permissions().
This commit is contained in:
David Greenman 1995-03-19 23:27:57 +00:00
parent f5277ae71e
commit 9022e4ad9c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7177

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_exec.c,v 1.16 1995/03/16 18:12:30 bde Exp $
* $Id: kern_exec.c,v 1.17 1995/03/19 23:08:12 davidg Exp $
*/
#include <sys/param.h>
@ -138,15 +138,16 @@ execve(p, uap, retval)
}
/*
* Lose the lock on the vnode. It isn't needed, and must not
* Check file permissions (also 'opens' file)
*/
error = exec_check_permissions(iparams);
/*
* Lose the lock on the vnode. It's no longer needed, and must not
* exist for the pagefault paging to work below.
*/
VOP_UNLOCK(vnodep);
/*
* Check file permissions (also 'opens' file)
*/
error = exec_check_permissions(iparams);
if (error)
goto exec_fail_dealloc;