Commit fb9099bd authored by Roland McGrath's avatar Roland McGrath Committed by Linus Torvalds

[PATCH] fix core-dump return code

While looking at the signal.c coredumping BUG_ON race, I noticed a bug
(not directly related) in do_coredump.  It was setting the "core dumped"
flag even when the format dumping hook failed (e.g.  for memory
allocation failures).
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 66edd549
......@@ -1411,6 +1411,7 @@ int do_coredump(long signr, int exit_code, struct pt_regs * regs)
retval = binfmt->core_dump(signr, regs, file);
if (retval)
current->signal->group_exit_code |= 0x80;
close_fail:
filp_close(file, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment