summaryrefslogtreecommitdiffstats
path: root/fs/binfmt_aout.c
diff options
context:
space:
mode:
authorOleg Nesterov2013-05-01 00:28:13 +0200
committerLinus Torvalds2013-05-01 02:04:06 +0200
commitacdedd99b0f3bff9b4bb2103a6b1268c03d1f963 (patch)
treebfacbb825c6024a0374db0a6a38a222581b15083 /fs/binfmt_aout.c
parentcoredump: ensure that SIGKILL always kills the dumping thread (diff)
downloadkernel-qcow2-linux-acdedd99b0f3bff9b4bb2103a6b1268c03d1f963.tar.gz
kernel-qcow2-linux-acdedd99b0f3bff9b4bb2103a6b1268c03d1f963.tar.xz
kernel-qcow2-linux-acdedd99b0f3bff9b4bb2103a6b1268c03d1f963.zip
coredump: sanitize the setting of signal->group_exit_code
Now that the coredumping process can be SIGKILL'ed, the setting of ->group_exit_code in do_coredump() can race with complete_signal() and SIGKILL or 0x80 can be "lost", or wait(status) can report status == SIGKILL | 0x80. But the main problem is that it is not clear to me what should we do if binfmt->core_dump() succeeds but SIGKILL was sent, that is why this patch comes as a separate change. This patch adds 0x80 if ->core_dump() succeeds and the process was not killed. But perhaps we can (should?) re-set ->group_exit_code changed by SIGKILL back to "siginfo->si_signo |= 0x80" in case when core_dumped == T. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Tested-by: Mandeep Singh Baines <msb@chromium.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Neil Horman <nhorman@redhat.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Roland McGrath <roland@hack.frob.com> Cc: Tejun Heo <tj@kernel.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/binfmt_aout.c')
0 files changed, 0 insertions, 0 deletions