diff options
Diffstat (limited to 'kernel/printk.c')
-rw-r--r-- | kernel/printk.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 55d16e57499a..8b42f87e311d 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -652,16 +652,14 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu) | |||
652 | spin_unlock(&logbuf_lock); | 652 | spin_unlock(&logbuf_lock); |
653 | return retval; | 653 | return retval; |
654 | } | 654 | } |
655 | 655 | static const char recursion_bug_msg [] = | |
656 | const char printk_recursion_bug_msg [] = | 656 | KERN_CRIT "BUG: recent printk recursion!\n"; |
657 | KERN_CRIT "BUG: recent printk recursion!\n"; | 657 | static int recursion_bug; |
658 | static int printk_recursion_bug; | 658 | static int log_level_unknown = 1; |
659 | static char printk_buf[1024]; | ||
659 | 660 | ||
660 | asmlinkage int vprintk(const char *fmt, va_list args) | 661 | asmlinkage int vprintk(const char *fmt, va_list args) |
661 | { | 662 | { |
662 | static int log_level_unknown = 1; | ||
663 | static char printk_buf[1024]; | ||
664 | |||
665 | unsigned long flags; | 663 | unsigned long flags; |
666 | int printed_len = 0; | 664 | int printed_len = 0; |
667 | int this_cpu; | 665 | int this_cpu; |
@@ -686,7 +684,7 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
686 | * it can be printed at the next appropriate moment: | 684 | * it can be printed at the next appropriate moment: |
687 | */ | 685 | */ |
688 | if (!oops_in_progress) { | 686 | if (!oops_in_progress) { |
689 | printk_recursion_bug = 1; | 687 | recursion_bug = 1; |
690 | goto out_restore_irqs; | 688 | goto out_restore_irqs; |
691 | } | 689 | } |
692 | zap_locks(); | 690 | zap_locks(); |
@@ -696,10 +694,10 @@ asmlinkage int vprintk(const char *fmt, va_list args) | |||
696 | spin_lock(&logbuf_lock); | 694 | spin_lock(&logbuf_lock); |
697 | printk_cpu = this_cpu; | 695 | printk_cpu = this_cpu; |
698 | 696 | ||
699 | if (printk_recursion_bug) { | 697 | if (recursion_bug) { |
700 | printk_recursion_bug = 0; | 698 | recursion_bug = 0; |
701 | strcpy(printk_buf, printk_recursion_bug_msg); | 699 | strcpy(printk_buf, recursion_bug_msg); |
702 | printed_len = sizeof(printk_recursion_bug_msg); | 700 | printed_len = sizeof(recursion_bug_msg); |
703 | } | 701 | } |
704 | /* Emit the output into the temporary buffer */ | 702 | /* Emit the output into the temporary buffer */ |
705 | printed_len += vscnprintf(printk_buf + printed_len, | 703 | printed_len += vscnprintf(printk_buf + printed_len, |