Page MenuHomeFreeBSD

D19889.diff
No OneTemporary

D19889.diff

Index: head/sys/kern/kern_exec.c
===================================================================
--- head/sys/kern/kern_exec.c
+++ head/sys/kern/kern_exec.c
@@ -679,23 +679,14 @@
sys_cap_enter(td, NULL);
/*
- * Copy out strings (args and env) and initialize stack base
+ * Copy out strings (args and env) and initialize stack base.
*/
- if (p->p_sysent->sv_copyout_strings)
- stack_base = (*p->p_sysent->sv_copyout_strings)(imgp);
- else
- stack_base = exec_copyout_strings(imgp);
+ stack_base = (*p->p_sysent->sv_copyout_strings)(imgp);
/*
- * If custom stack fixup routine present for this process
- * let it do the stack setup.
- * Else stuff argument count as first item on stack
+ * Stack setup.
*/
- if (p->p_sysent->sv_fixup != NULL)
- error = (*p->p_sysent->sv_fixup)(&stack_base, imgp);
- else
- error = suword(--stack_base, imgp->args->argc) == 0 ?
- 0 : EFAULT;
+ error = (*p->p_sysent->sv_fixup)(&stack_base, imgp);
if (error != 0) {
vn_lock(imgp->vp, LK_SHARED | LK_RETRY);
goto exec_fail_dealloc;
@@ -880,11 +871,7 @@
#endif
/* Set values passed into the program in registers. */
- if (p->p_sysent->sv_setregs)
- (*p->p_sysent->sv_setregs)(td, imgp,
- (u_long)(uintptr_t)stack_base);
- else
- exec_setregs(td, imgp, (u_long)(uintptr_t)stack_base);
+ (*p->p_sysent->sv_setregs)(td, imgp, (u_long)(uintptr_t)stack_base);
vfs_mark_atime(imgp->vp, td->td_ucred);

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 26, 5:31 AM (10 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28003269
Default Alt Text
D19889.diff (1 KB)

Event Timeline