diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index cb8a6bd697c6..0b3ea2cbd5fb 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -707,6 +707,9 @@ static bool printk_time = 0; | |||
707 | #endif | 707 | #endif |
708 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); | 708 | module_param_named(time, printk_time, bool, S_IRUGO | S_IWUSR); |
709 | 709 | ||
710 | static bool always_kmsg_dump; | ||
711 | module_param_named(always_kmsg_dump, always_kmsg_dump, bool, S_IRUGO | S_IWUSR); | ||
712 | |||
710 | /* Check if we have any console registered that can be called early in boot. */ | 713 | /* Check if we have any console registered that can be called early in boot. */ |
711 | static int have_callable_console(void) | 714 | static int have_callable_console(void) |
712 | { | 715 | { |
@@ -1737,6 +1740,9 @@ void kmsg_dump(enum kmsg_dump_reason reason) | |||
1737 | unsigned long l1, l2; | 1740 | unsigned long l1, l2; |
1738 | unsigned long flags; | 1741 | unsigned long flags; |
1739 | 1742 | ||
1743 | if ((reason > KMSG_DUMP_OOPS) && !always_kmsg_dump) | ||
1744 | return; | ||
1745 | |||
1740 | /* Theoretically, the log could move on after we do this, but | 1746 | /* Theoretically, the log could move on after we do this, but |
1741 | there's not a lot we can do about that. The new messages | 1747 | there's not a lot we can do about that. The new messages |
1742 | will overwrite the start of what we dump. */ | 1748 | will overwrite the start of what we dump. */ |