diff options
author | dchagin <dchagin@FreeBSD.org> | 2015-05-25 20:44:46 +0000 |
---|---|---|
committer | dchagin <dchagin@FreeBSD.org> | 2015-05-25 20:44:46 +0000 |
commit | 50f49b724028193c2880a086fdbbe1a7e5ab3e80 (patch) | |
tree | b5d5457fce8138b09a5295e94fb2db013079d740 /sys/compat/linux/linux_emul.c | |
parent | fe042f46ba0cc76c4bfbc6d0e5c2fb406ec39088 (diff) | |
download | FreeBSD-src-50f49b724028193c2880a086fdbbe1a7e5ab3e80.zip FreeBSD-src-50f49b724028193c2880a086fdbbe1a7e5ab3e80.tar.gz |
When I merged the lemul branch I missied kib@'s r282708 commit.
This is not the final fix as I need properly cleanup thread resources
before other threads suicide.
Tested by: Ruslan Makhmatkhanov
Diffstat (limited to 'sys/compat/linux/linux_emul.c')
-rw-r--r-- | sys/compat/linux/linux_emul.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 0023727..a28da8d 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -172,27 +172,19 @@ linux_common_execve(struct thread *td, struct image_args *eargs) { struct linux_pemuldata *pem; struct epoll_emuldata *emd; + struct vmspace *oldvmspace; struct linux_emuldata *em; struct proc *p; int error; p = td->td_proc; - /* - * Unlike FreeBSD abort all other threads before - * proceeding exec. - */ - PROC_LOCK(p); - /* See exit1() comments. */ - thread_suspend_check(0); - while (p->p_flag & P_HADTHREADS) { - if (!thread_single(p, SINGLE_EXIT)) - break; - thread_suspend_check(0); - } - PROC_UNLOCK(p); + error = pre_execve(td, &oldvmspace); + if (error != 0) + return (error); error = kern_execve(td, eargs, NULL); + post_execve(td, error, oldvmspace); if (error != 0) return (error); |