summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-15 17:11:36 +0100
committerArnd Bergmann <arnd@arndb.de>2012-03-15 17:11:40 +0100
commit86a30bece9ad4cc91c393a829a7b128291e0fb65 (patch)
tree6cb3e6ad413d74118535f77436056c8d3cfae0eb /fs/exec.c
parentMAINTAINERS: ARM: tegra: update Stephen's email address (diff)
parentMAINTAINERS: update MAINTAINERS email entry (diff)
downloadlinux-86a30bece9ad4cc91c393a829a7b128291e0fb65.tar.xz
linux-86a30bece9ad4cc91c393a829a7b128291e0fb65.zip
Merge branch 'fixes-non-critical' of git://github.com/hzhuang1/linux into next/maintainers
* 'fixes-non-critical' of git://github.com/hzhuang1/linux: MAINTAINERS: update MAINTAINERS email entry MAINTAINERS: update maintainer entry for pxa/hx4700 (update to v3.3-rc7) Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 92ce83a11e90..153dee14fe55 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1915,7 +1915,6 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
{
struct task_struct *tsk = current;
struct mm_struct *mm = tsk->mm;
- struct completion *vfork_done;
int core_waiters = -EBUSY;
init_completion(&core_state->startup);
@@ -1927,22 +1926,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
core_waiters = zap_threads(tsk, mm, core_state, exit_code);
up_write(&mm->mmap_sem);
- if (unlikely(core_waiters < 0))
- goto fail;
-
- /*
- * Make sure nobody is waiting for us to release the VM,
- * otherwise we can deadlock when we wait on each other
- */
- vfork_done = tsk->vfork_done;
- if (vfork_done) {
- tsk->vfork_done = NULL;
- complete(vfork_done);
- }
-
- if (core_waiters)
+ if (core_waiters > 0)
wait_for_completion(&core_state->startup);
-fail:
+
return core_waiters;
}