mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 4 additions and 4 deletions
|
|
@ -412,10 +412,6 @@ interpret:
|
|||
/* 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 @@ interpret:
|
|||
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 a new issue