diff options
author | kib <kib@FreeBSD.org> | 2006-11-15 11:04:37 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2006-11-15 11:04:37 +0000 |
commit | 4532665da9da20f608bd2583e203af67568bd809 (patch) | |
tree | f4bbd7cb5dfa7915f16569c56926da7de6f925ba /sys/compat/linux/linux_emul.c | |
parent | 5bee73d962d69192303f1c49c0a617d5fbd7de6a (diff) | |
download | FreeBSD-src-4532665da9da20f608bd2583e203af67568bd809.zip FreeBSD-src-4532665da9da20f608bd2583e203af67568bd809.tar.gz |
Group pid and parent are shared in a case of CLONE_THREAD not CLONE_VM.
This fix lets clone02 LTP test pass with 2.6 emulation. In reality 99%
of the cases are that CLONE_VM and CLONE_THREAD are both set so it
seemed to work.
Submitted by: rdivacky
Diffstat (limited to 'sys/compat/linux/linux_emul.c')
-rw-r--r-- | sys/compat/linux/linux_emul.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index a2471ac..c9ecd4d 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -85,7 +85,7 @@ linux_proc_init(struct thread *td, pid_t child, int flags) em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; em->pdeath_signal = 0; - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* handled later in the code */ } else { struct linux_emuldata_shared *s; @@ -117,10 +117,10 @@ linux_proc_init(struct thread *td, pid_t child, int flags) * the newly created proc */ if (child != 0) { - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* lookup the parent */ p_em = em_find(td->td_proc, EMUL_LOCKED); - KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; } else { |