Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73485
b: refs/heads/master
c: 00ec99d
h: refs/heads/master
i:
  73483: a912461
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Nov 12, 2007
1 parent b4031c6 commit 2627bee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 6e800af233e0bdf108efb7bd23c11ea6fa34cdeb
refs/heads/master: 00ec99da43a7c2aed46c6595aa271b84bb1b1462
6 changes: 4 additions & 2 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,10 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
if (!binfmt || !binfmt->core_dump)
goto fail;
down_write(&mm->mmap_sem);
if (!get_dumpable(mm)) {
/*
* If another thread got here first, or we are not dumpable, bail out.
*/
if (mm->core_waiters || !get_dumpable(mm)) {
up_write(&mm->mmap_sem);
goto fail;
}
Expand All @@ -1706,7 +1709,6 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
flag = O_EXCL; /* Stop rewrite attacks */
current->fsuid = 0; /* Dump root private */
}
set_dumpable(mm, 0);

retval = coredump_wait(exit_code);
if (retval < 0)
Expand Down

0 comments on commit 2627bee

Please sign in to comment.