aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/exec.c b/fs/exec.c
index e347e6ed161..71734568f01 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1597,13 +1597,13 @@ static int coredump_wait(int exit_code)
1597{ 1597{
1598 struct task_struct *tsk = current; 1598 struct task_struct *tsk = current;
1599 struct mm_struct *mm = tsk->mm; 1599 struct mm_struct *mm = tsk->mm;
1600 struct completion startup_done; 1600 struct core_state core_state;
1601 struct completion *vfork_done; 1601 struct completion *vfork_done;
1602 int core_waiters; 1602 int core_waiters;
1603 1603
1604 init_completion(&mm->core_done); 1604 init_completion(&mm->core_done);
1605 init_completion(&startup_done); 1605 init_completion(&core_state.startup);
1606 mm->core_startup_done = &startup_done; 1606 mm->core_state = &core_state;
1607 1607
1608 core_waiters = zap_threads(tsk, mm, exit_code); 1608 core_waiters = zap_threads(tsk, mm, exit_code);
1609 up_write(&mm->mmap_sem); 1609 up_write(&mm->mmap_sem);
@@ -1622,7 +1622,7 @@ static int coredump_wait(int exit_code)
1622 } 1622 }
1623 1623
1624 if (core_waiters) 1624 if (core_waiters)
1625 wait_for_completion(&startup_done); 1625 wait_for_completion(&core_state.startup);
1626fail: 1626fail:
1627 BUG_ON(mm->core_waiters); 1627 BUG_ON(mm->core_waiters);
1628 return core_waiters; 1628 return core_waiters;