Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11854
b: refs/heads/master
c: 2384f55
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 31, 2005
1 parent d91868c commit 87ff7ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: 7407251a0e2ed099e4b12b742b635503e981507c
refs/heads/master: 2384f55f8aa520172c995965bd2f8a9740d53095
13 changes: 5 additions & 8 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1417,19 +1417,16 @@ static void zap_threads (struct mm_struct *mm)
static void coredump_wait(struct mm_struct *mm)
{
DECLARE_COMPLETION(startup_done);
int core_waiters;

mm->core_waiters++; /* let other threads block */
mm->core_startup_done = &startup_done;

/* give other threads a chance to run: */
yield();

zap_threads(mm);
if (--mm->core_waiters) {
up_write(&mm->mmap_sem);
core_waiters = mm->core_waiters;
up_write(&mm->mmap_sem);

if (core_waiters)
wait_for_completion(&startup_done);
} else
up_write(&mm->mmap_sem);
BUG_ON(mm->core_waiters);
}

Expand Down

0 comments on commit 87ff7ea

Please sign in to comment.