summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-08-03 16:11:32 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-08-03 16:11:32 +0000
commitc521aa1be51fe6cf5c467fd0dd8c63377aa82f83 (patch)
treedbdc126a15d9488fa08d66bc893d717579946750 /sys/compat
parentbd7ebeca9ddd78842746f38aa29b57d1c8305add (diff)
Fix linux compat breakage: can't copyin() from kernel-space, so
move that out of i386_set_threadbase(), and have clone() pass NULL to fork1() for the child func argument so that it gets the child proc pointer. Report and verification by pirofti@, heavy lifting by matthew@
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linux/linux_sched.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_sched.c b/sys/compat/linux/linux_sched.c
index 61a4b5b98ad..14b00c23bf8 100644
--- a/sys/compat/linux/linux_sched.c
+++ b/sys/compat/linux/linux_sched.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_sched.c,v 1.10 2011/04/05 15:44:40 pirofti Exp $ */
+/* $OpenBSD: linux_sched.c,v 1.11 2011/08/03 16:11:31 guenther Exp $ */
/* $NetBSD: linux_sched.c,v 1.6 2000/05/28 05:49:05 thorpej Exp $ */
/*-
@@ -177,7 +177,7 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval)
* that makes this adjustment is a noop.
*/
error = fork1(p, sig, flags, SCARG(uap, stack), 0, linux_child_return,
- p, retval, NULL);
+ NULL, retval, NULL);
if (error)
return error;
@@ -407,8 +407,7 @@ linux_child_return(void *arg)
struct proc *p = (struct proc *)arg;
struct linux_emuldata *emul = p->p_emuldata;
- if (i386_set_threadbase(p, &emul->my_tls_base, TSEG_GS))
- return;
+ i386_set_threadbase(p, emul->my_tls_base, TSEG_GS);
if (emul->my_set_tid) {
pid_t pid = p->p_pid + THREAD_PID_OFFSET;