Move setregs() out from under the PROC_LOCK so that it can use functions
list suword() which may trap.
This commit is contained in:
parent
6628011155
commit
e913ca22e2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84778
@ -412,10 +412,6 @@ execve(td, uap)
|
||||
/* clear "fork but no exec" flag, as we _are_ execing */
|
||||
p->p_acflag &= ~AFORK;
|
||||
|
||||
/* Set values passed into the program in registers. */
|
||||
setregs(td, imgp->entry_addr, (u_long)(uintptr_t)stack_base,
|
||||
imgp->ps_strings);
|
||||
|
||||
/* Free any previous argument cache */
|
||||
pa = p->p_args;
|
||||
p->p_args = NULL;
|
||||
@ -423,6 +419,10 @@ execve(td, uap)
|
||||
if (pa != NULL && --pa->ar_ref == 0)
|
||||
FREE(pa, M_PARGS);
|
||||
|
||||
/* Set values passed into the program in registers. */
|
||||
setregs(td, imgp->entry_addr, (u_long)(uintptr_t)stack_base,
|
||||
imgp->ps_strings);
|
||||
|
||||
/* Cache arguments if they fit inside our allowance */
|
||||
i = imgp->endargs - imgp->stringbase;
|
||||
if (ps_arg_cache_limit >= i + sizeof(struct pargs)) {
|
||||
|
Loading…
Reference in New Issue
Block a user