diff options
author | alc <alc@FreeBSD.org> | 2002-01-13 19:36:35 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2002-01-13 19:36:35 +0000 |
commit | 62ca6901d83420a325a86af3149e5835bc7d814c (patch) | |
tree | 23a3a70d57d638c898297ad9d9fdb21f7d1d7c3c /sys/kern | |
parent | d3a306bcb9a9667b3248fb405d5a6dd0b88b8fe8 (diff) | |
download | FreeBSD-src-62ca6901d83420a325a86af3149e5835bc7d814c.zip FreeBSD-src-62ca6901d83420a325a86af3149e5835bc7d814c.tar.gz |
o Call the functions registered with at_exec() from exec_new_vmspace()
instead of execve(). Otherwise, the possibility still exists
for a pending AIO to modify the new address space.
Reviewed by: alfred
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_exec.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 3fe2ab3..bbdc7eb 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -128,7 +128,6 @@ execve(td, uap) struct vattr attr; int (*img_first) __P((struct image_params *)); struct pargs *pa; - struct execlist *ep; imgp = &image_params; @@ -258,9 +257,6 @@ interpret: goto interpret; } - TAILQ_FOREACH(ep, &exec_list, next) - (*ep->function)(p); - /* * Copy out strings (args and env) and initialize stack base */ @@ -584,6 +580,7 @@ exec_new_vmspace(imgp) struct image_params *imgp; { int error; + struct execlist *ep; struct vmspace *vmspace = imgp->proc->p_vmspace; vm_offset_t stack_addr = USRSTACK - maxssiz; vm_map_t map = &vmspace->vm_map; @@ -593,6 +590,12 @@ exec_new_vmspace(imgp) imgp->vmspace_destroyed = 1; /* + * Perform functions registered with at_exec(). + */ + TAILQ_FOREACH(ep, &exec_list, next) + (*ep->function)(imgp->proc); + + /* * Blow away entire process VM, if address space not shared, * otherwise, create a new VM space so that other threads are * not disrupted |