diff options
author | 2012-06-20 11:37:21 +0000 | |
---|---|---|
committer | 2012-06-20 11:37:21 +0000 | |
commit | 6924bb557da2d9b14c4aba8da94ab61b12b97edb (patch) | |
tree | af95b71264dea4fe10b3342fbe097ef16b1fde79 | |
parent | - urndis_match() should support multiple interface descriptors. (diff) | |
download | wireguard-openbsd-6924bb557da2d9b14c4aba8da94ab61b12b97edb.tar.xz wireguard-openbsd-6924bb557da2d9b14c4aba8da94ab61b12b97edb.zip |
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@.
-rw-r--r-- | sys/compat/linux/linux_exec.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 * |