- Initialize vfslocked correctly early enough for MAC to compile.
- Fix one place where we explicitly drop Giant! Pointy hat to: me Submitted by: Max Laier Warned by: Tinderbox
This commit is contained in:
parent
93df2af1e5
commit
f18e885d75
@ -301,6 +301,7 @@ do_execve(td, args, mac_p)
|
||||
int will_transition;
|
||||
#endif
|
||||
|
||||
vfslocked = 0;
|
||||
imgp = &image_params;
|
||||
|
||||
/*
|
||||
@ -336,10 +337,8 @@ do_execve(td, args, mac_p)
|
||||
|
||||
#ifdef MAC
|
||||
error = mac_execve_enter(imgp, mac_p);
|
||||
if (error) {
|
||||
mtx_lock(&Giant);
|
||||
if (error)
|
||||
goto exec_fail;
|
||||
}
|
||||
#endif
|
||||
|
||||
imgp->image_header = NULL;
|
||||
@ -353,7 +352,6 @@ do_execve(td, args, mac_p)
|
||||
UIO_SYSSPACE, args->fname, td);
|
||||
|
||||
interpret:
|
||||
vfslocked = 0;
|
||||
error = namei(ndp);
|
||||
if (error)
|
||||
goto exec_fail;
|
||||
@ -440,6 +438,7 @@ do_execve(td, args, mac_p)
|
||||
vm_object_deallocate(imgp->object);
|
||||
imgp->object = NULL;
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
vfslocked = 0;
|
||||
/* set new name to that of the interpreter */
|
||||
NDINIT(ndp, LOOKUP, LOCKLEAF | FOLLOW | SAVENAME | MPSAFE,
|
||||
UIO_SYSSPACE, imgp->interpreter_name, td);
|
||||
@ -763,7 +762,7 @@ do_execve(td, args, mac_p)
|
||||
if (interplabel != NULL)
|
||||
mac_vnode_label_free(interplabel);
|
||||
#endif
|
||||
mtx_unlock(&Giant);
|
||||
VFS_UNLOCK_GIANT(vfslocked);
|
||||
exit1(td, W_EXITCODE(0, SIGABRT));
|
||||
/* NOT REACHED */
|
||||
error = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user