diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 9213b8b5bb4f..444b770c9595 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/bootmem.h> | 33 | #include <linux/bootmem.h> |
34 | #include <linux/syscalls.h> | 34 | #include <linux/syscalls.h> |
35 | #include <linux/kexec.h> | 35 | #include <linux/kexec.h> |
36 | #include <linux/kdb.h> | ||
36 | #include <linux/ratelimit.h> | 37 | #include <linux/ratelimit.h> |
37 | #include <linux/kmsg_dump.h> | 38 | #include <linux/kmsg_dump.h> |
38 | #include <linux/syslog.h> | 39 | #include <linux/syslog.h> |
@@ -602,6 +603,14 @@ asmlinkage int printk(const char *fmt, ...) | |||
602 | va_list args; | 603 | va_list args; |
603 | int r; | 604 | int r; |
604 | 605 | ||
606 | #ifdef CONFIG_KGDB_KDB | ||
607 | if (unlikely(kdb_trap_printk)) { | ||
608 | va_start(args, fmt); | ||
609 | r = vkdb_printf(fmt, args); | ||
610 | va_end(args); | ||
611 | return r; | ||
612 | } | ||
613 | #endif | ||
605 | va_start(args, fmt); | 614 | va_start(args, fmt); |
606 | r = vprintk(fmt, args); | 615 | r = vprintk(fmt, args); |
607 | va_end(args); | 616 | va_end(args); |