diff options
author | Oleg Nesterov <oleg@redhat.com> | 2012-03-05 17:59:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-05 18:49:42 -0500 |
commit | 57b59c4a1400fa6c34764eab2e35a8762dc05a09 (patch) | |
tree | e50e6a6f9f7fcd897856e5cdaca3d3caa18377d6 /fs/exec.c | |
parent | d68b46fe16ad59b3a5f51ec73daaa5dc06753798 (diff) |
coredump_wait: don't call complete_vfork_done()
Now that CLONE_VFORK is killable, coredump_wait() no longer needs
complete_vfork_done(). zap_threads() should find and kill all tasks with
the same ->mm, this includes our parent if ->vfork_done is set.
mm_release() becomes the only caller, unexport complete_vfork_done().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -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); |
1941 | fail: | 1931 | |
1942 | return core_waiters; | 1932 | return core_waiters; |
1943 | } | 1933 | } |
1944 | 1934 | ||