Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305464
b: refs/heads/master
c: 11aeca0
h: refs/heads/master
v: v3
  • Loading branch information
Suresh Siddha authored and H. Peter Anvin committed May 16, 2012
1 parent e842c6e commit 6abd567
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55ccf3fe3f9a3441731aa79cf42a628fc4ecace9
refs/heads/master: 11aeca0b3a083a457f5c34fe8c677d5e86a0c6b3
15 changes: 14 additions & 1 deletion trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1930,8 +1930,21 @@ 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 (core_waiters > 0)
if (core_waiters > 0) {
struct core_thread *ptr;

wait_for_completion(&core_state->startup);
/*
* Wait for all the threads to become inactive, so that
* all the thread context (extended register state, like
* fpu etc) gets copied to the memory.
*/
ptr = core_state->dumper.next;
while (ptr != NULL) {
wait_task_inactive(ptr->task, 0);
ptr = ptr->next;
}
}

return core_waiters;
}
Expand Down

0 comments on commit 6abd567

Please sign in to comment.