aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/exec.c b/fs/exec.c
index dccdcec913e9..153dee14fe55 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1926,19 +1926,9 @@ static int coredump_wait(int exit_code, struct core_state *core_state)
1926 core_waiters = zap_threads(tsk, mm, core_state, exit_code); 1926 core_waiters = zap_threads(tsk, mm, core_state, exit_code);
1927 up_write(&mm->mmap_sem); 1927 up_write(&mm->mmap_sem);
1928 1928
1929 if (unlikely(core_waiters < 0)) 1929 if (core_waiters > 0)
1930 goto fail;
1931
1932 /*
1933 * Make sure nobody is waiting for us to release the VM,
1934 * otherwise we can deadlock when we wait on each other
1935 */
1936 if (tsk->vfork_done)
1937 complete_vfork_done(tsk);
1938
1939 if (core_waiters)
1940 wait_for_completion(&core_state->startup); 1930 wait_for_completion(&core_state->startup);
1941fail: 1931
1942 return core_waiters; 1932 return core_waiters;
1943} 1933}
1944 1934