From 6924bb557da2d9b14c4aba8da94ab61b12b97edb Mon Sep 17 00:00:00 2001 From: pirofti Date: Wed, 20 Jun 2012 11:37:21 +0000 Subject: Copy the set_tls_base flag when forking. This enables the linux_child_return bits that set the TLS base in the newly forked process. Before this, processes that had the flag set would get a null pointer and segfault when trying to access the TLS area. Chased down and fixed by me. Turned into a proper one line diff by guenther@. --- sys/compat/linux/linux_exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/compat/linux/linux_exec.c') diff --git a/sys/compat/linux/linux_exec.c b/sys/compat/linux/linux_exec.c index 4673f2fb7b0..c587445b246 100644 --- a/sys/compat/linux/linux_exec.c +++ b/sys/compat/linux/linux_exec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_exec.c,v 1.35 2011/09/18 02:23:18 pirofti Exp $ */ +/* $OpenBSD: linux_exec.c,v 1.36 2012/06/20 11:37:21 pirofti Exp $ */ /* $NetBSD: linux_exec.c,v 1.13 1996/04/05 00:01:10 christos Exp $ */ /*- @@ -215,6 +215,7 @@ linux_e_proc_fork(struct proc *p, struct proc *parent) emul->my_set_tid = p_emul->child_set_tid; emul->my_clear_tid = p_emul->child_clear_tid; emul->my_tls_base = p_emul->child_tls_base; + emul->set_tls_base = p_emul->set_tls_base; } static void * -- cgit v1.2.3-59-g8ed1b