Revert "binfmt_elf, coredump: Log the reason of the failed core dumps"

This reverts commit fb97d2eb54.

The logging was questionable to begin with, but it seems to actively
deadlock on the task lock.

 "On second thought, let's not log core dump failures. 'Tis a silly place"

because if you can't tell your core dump is truncated, maybe you should
just fix your debugger instead of adding bugs to the kernel.

Reported-by: Vegard Nossum <vegard.nossum@oracle.com>
Link: https://lore.kernel.org/all/d122ece6-3606-49de-ae4d-8da88846bef2@oracle.com/
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Linus Torvalds
2024-09-26 11:39:02 -07:00
parent 62a0e2fa40
commit a78282e2c9
4 changed files with 34 additions and 150 deletions

View File

@@ -2888,8 +2888,6 @@ bool get_signal(struct ksignal *ksig)
current->flags |= PF_SIGNALED;
if (sig_kernel_coredump(signr)) {
int ret;
if (print_fatal_signals)
print_fatal_signal(signr);
proc_coredump_connector(current);
@@ -2901,24 +2899,7 @@ bool get_signal(struct ksignal *ksig)
* first and our do_group_exit call below will use
* that value and ignore the one we pass it.
*/
ret = do_coredump(&ksig->info);
if (ret)
coredump_report_failure("coredump has not been created, error %d",
ret);
else if (!IS_ENABLED(CONFIG_COREDUMP)) {
/*
* Coredumps are not available, can't fail collecting
* the coredump.
*
* Leave a note though that the coredump is going to be
* not created. This is not an error or a warning as disabling
* support in the kernel for coredumps isn't commonplace, and
* the user must've built the kernel with the custom config so
* let them know all works as desired.
*/
coredump_report("no coredump collected as "
"that is disabled in the kernel configuration");
}
do_coredump(&ksig->info);
}
/*