mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Call sv_onexec hook after the process VA is created.
For future use in the Linux emulation layer call sv_onexec hook right after the new process address space is created. It's safe, as sv_onexec used only by Linux abi and linux_on_exec() does not depend on a state of process VA. Reviewed by: kib Differential revision: https://reviews.freebsd.org/D30899 MFC after: 2 weeks
This commit is contained in:
parent
b39fa4770d
commit
62ba4cd340
1 changed files with 2 additions and 2 deletions
|
|
@ -1072,8 +1072,6 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
|
|||
if (p->p_sysent->sv_onexec_old != NULL)
|
||||
p->p_sysent->sv_onexec_old(td);
|
||||
itimers_exec(p);
|
||||
if (sv->sv_onexec != NULL)
|
||||
sv->sv_onexec(p, imgp);
|
||||
|
||||
EVENTHANDLER_DIRECT_INVOKE(process_exec, p, imgp);
|
||||
|
||||
|
|
@ -1165,6 +1163,8 @@ exec_new_vmspace(struct image_params *imgp, struct sysentvec *sv)
|
|||
vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT;
|
||||
vmspace->vm_maxsaddr = (char *)stack_addr;
|
||||
|
||||
if (sv->sv_onexec != NULL)
|
||||
sv->sv_onexec(p, imgp);
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue