aboutsummaryrefslogtreecommitdiff
path: root/sys/i386/linux/linux_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386/linux/linux_machdep.c')
-rw-r--r--sys/i386/linux/linux_machdep.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/i386/linux/linux_machdep.c b/sys/i386/linux/linux_machdep.c
index b8e18eff1947..6af39d216aec 100644
--- a/sys/i386/linux/linux_machdep.c
+++ b/sys/i386/linux/linux_machdep.c
@@ -559,7 +559,7 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
* this is what normal fork() does so we just keep the tf_esp arg intact
*/
if (args->stack)
- td2->td_frame->tf_esp = (unsigned int)args->stack;
+ linux_set_upcall_kse(td2, PTROUT(args->stack));
if (args->flags & LINUX_CLONE_SETTLS)
linux_set_cloned_tls(td2, args->tls);
@@ -597,6 +597,15 @@ linux_clone(struct thread *td, struct linux_clone_args *args)
return (0);
}
+int
+linux_set_upcall_kse(struct thread *td, register_t stack)
+{
+
+ td->td_frame->tf_esp = stack;
+
+ return (0);
+}
+
#define STACK_SIZE (2 * 1024 * 1024)
#define GUARD_SIZE (4 * PAGE_SIZE)