aboutsummaryrefslogtreecommitdiff
path: root/include/linux/kmsg_dump.h
AgeCommit message (Collapse)AuthorFilesLines
2009-12-31kmsg_dump: Dump on crash_kexec as wellKOSAKI Motohiro1-0/+1
crash_kexec gets called before kmsg_dump(KMSG_DUMP_OOPS) if panic_on_oops is set, so the kernel log buffer is not stored for this case. This patch adds a KMSG_DUMP_KEXEC dump type which gets called when crash_kexec() is invoked. To avoid getting double dumps, the old KMSG_DUMP_PANIC is moved below crash_kexec(). The mtdoops driver is modified to handle KMSG_DUMP_KEXEC in the same way as a panic. Signed-off-by: KOSAKI Motohiro <[email protected]> Acked-by: Simon Kagstrom <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2009-12-02kmsg_dump: fix build for CONFIG_PRINTK=nRandy Dunlap1-0/+16
kmsg_dump() fails to build when CONFIG_PRINTK=n; provide stubs for the kmsg_dump*() functions when CONFIG_PRINTK=n. kernel/printk.c: In function 'kmsg_dump': kernel/printk.c:1501: error: 'log_buf_len' undeclared (first use in this function) kernel/printk.c:1502: error: 'logged_chars' undeclared (first use in this function) kernel/printk.c:1506: error: 'log_buf' undeclared (first use in this function) Signed-off-by: Randy Dunlap <[email protected]> Acked-by: Simon Kagstrom <[email protected]> Signed-off-by: David Woodhouse <[email protected]>
2009-11-30core: Add kernel message dumper to call on oopses and panicsSimon Kagstrom1-0/+44
The core functionality is implemented as per Linus suggestion from http://lists.infradead.org/pipermail/linux-mtd/2009-October/027620.html (with the kmsg_dump implementation by Linus). A struct kmsg_dumper has been added which contains a callback to dump the kernel log buffers on crashes. The kmsg_dump function gets called from oops_exit() and panic() and invokes this callbacks with the crash reason. [dwmw2: Fix log_end handling] Signed-off-by: Simon Kagstrom <[email protected]> Reviewed-by: Anders Grafstrom <[email protected]> Reviewed-by: Linus Torvalds <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]> Signed-off-by: David Woodhouse <[email protected]>