summaryrefslogtreecommitdiffstats
path: root/sys/compat/linux/linux_sched.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-02-12 05:47:36 +0000
committerguenther <guenther@openbsd.org>2014-02-12 05:47:36 +0000
commit34b8a7e274ff61bb47b6015f5da6546d44d5c136 (patch)
tree93ddeedb861df178102e6ad4c5cddfdcad522df4 /sys/compat/linux/linux_sched.c
parentDo not include pmap.h from .S code, but get the necessary defines from (diff)
downloadwireguard-openbsd-34b8a7e274ff61bb47b6015f5da6546d44d5c136.tar.xz
wireguard-openbsd-34b8a7e274ff61bb47b6015f5da6546d44d5c136.zip
Eliminate the exit sig handling, which was only invokable via the
Linux-compat clone() syscall when *not* using CLONE_THREAD. pirofti@ confirms Opera runs in compat without this, so out it goes; one less hair to choke on in kern_exit.c ok tedu@ pirofti@
Diffstat (limited to 'sys/compat/linux/linux_sched.c')
-rw-r--r--sys/compat/linux/linux_sched.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/sys/compat/linux/linux_sched.c b/sys/compat/linux/linux_sched.c
index 04fb2fec1b8..fa071ca93c9 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.15 2014/01/20 21:19:28 guenther Exp $ */
+/* $OpenBSD: linux_sched.c,v 1.16 2014/02/12 05:47:36 guenther Exp $ */
/* $NetBSD: linux_sched.c,v 1.6 2000/05/28 05:49:05 thorpej Exp $ */
/*-
@@ -61,7 +61,7 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval)
struct linux_sys_clone_args *uap = v;
struct linux_emuldata *emul = p->p_emuldata;
int cflags = SCARG(uap, flags);
- int flags = FORK_TFORK, sig;
+ int flags = FORK_TFORK;
int error = 0;
/*
@@ -130,18 +130,16 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval)
if ((cflags & (LINUX_CLONE_FS | LINUX_CLONE_FILES)) ==
LINUX_CLONE_FS)
return (EINVAL);
+
+ /* We don't support alternate exit signals. */
+ if ((cflags & LINUX_CLONE_CSIGNAL) != LINUX_SIGCHLD)
+ return (EINVAL);
}
/*
* Since we don't support CLONE_PTRACE, the CLONE_UNTRACED
* flag can be silently ignored. CLONE_DETACHED is always
* ignored by Linux.
*/
-
- sig = cflags & LINUX_CLONE_CSIGNAL;
- if (sig < 0 || sig >= LINUX__NSIG)
- return (EINVAL);
- sig = linux_to_bsd_sig[sig];
-
if (cflags & LINUX_CLONE_CHILD_SETTID)
emul->child_set_tid = SCARG(uap, child_tidptr);
else
@@ -177,7 +175,7 @@ linux_sys_clone(struct proc *p, void *v, register_t *retval)
* or down. So, we pass a stack size of 0, so that the code
* that makes this adjustment is a noop.
*/
- error = fork1(p, sig, flags, SCARG(uap, stack), 0, linux_child_return,
+ error = fork1(p, flags, SCARG(uap, stack), 0, linux_child_return,
NULL, retval, NULL);
if (error)
return error;