summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/um_arch.c
diff options
context:
space:
mode:
authorThomas Meyer <thomas@m3y3r.de>2015-03-28 10:07:37 +0100
committerRichard Weinberger <richard@nod.at>2015-04-13 21:17:37 +0200
commit04a418495e0852263d77c4fb82adf470feaafef3 (patch)
tree55101ddcf7076f7f90a4957b3cdaed946289ccd7 /arch/um/kernel/um_arch.c
parentx86, UML: fix integer overflow in ELF_ET_DYN_BASE (diff)
downloadlinux-04a418495e0852263d77c4fb82adf470feaafef3.tar.xz
linux-04a418495e0852263d77c4fb82adf470feaafef3.zip
um: add a kmsg_dumper
Add a kmsg_dumper, that dumps the kmsg buffer to stdout, when no console is available. This an enables the printing of early panic() calls triggered in uml_postsetup(). When a panic() call happens so early in the UML kernel no earlyprintk/console is available yet, but with a kmsg_dumper in place the kernel message buffer will be outputted to the user, to give a better hint, of what the failure was. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/kernel/um_arch.c')
-rw-r--r--arch/um/kernel/um_arch.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 9b06957e98ce..926ecdceba86 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -11,6 +11,7 @@
#include <linux/string.h>
#include <linux/utsname.h>
#include <linux/sched.h>
+#include <linux/kmsg_dump.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#include <asm/sections.h>
@@ -211,6 +212,7 @@ static void __init uml_postsetup(void)
static int panic_exit(struct notifier_block *self, unsigned long unused1,
void *unused2)
{
+ kmsg_dump(KMSG_DUMP_PANIC);
bust_spinlocks(1);
bust_spinlocks(0);
uml_exitcode = 1;