mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
printk: clean up recursion check related static variables
Make printk_recursion_bug_msg static and drop printk prefix from recursion variables. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
42fdfa238a
commit
3b8945e8d4
@ -652,16 +652,14 @@ static int acquire_console_semaphore_for_printk(unsigned int cpu)
|
||||
spin_unlock(&logbuf_lock);
|
||||
return retval;
|
||||
}
|
||||
|
||||
const char printk_recursion_bug_msg [] =
|
||||
KERN_CRIT "BUG: recent printk recursion!\n";
|
||||
static int printk_recursion_bug;
|
||||
static const char recursion_bug_msg [] =
|
||||
KERN_CRIT "BUG: recent printk recursion!\n";
|
||||
static int recursion_bug;
|
||||
static int log_level_unknown = 1;
|
||||
static char printk_buf[1024];
|
||||
|
||||
asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
{
|
||||
static int log_level_unknown = 1;
|
||||
static char printk_buf[1024];
|
||||
|
||||
unsigned long flags;
|
||||
int printed_len = 0;
|
||||
int this_cpu;
|
||||
@ -686,7 +684,7 @@ asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
* it can be printed at the next appropriate moment:
|
||||
*/
|
||||
if (!oops_in_progress) {
|
||||
printk_recursion_bug = 1;
|
||||
recursion_bug = 1;
|
||||
goto out_restore_irqs;
|
||||
}
|
||||
zap_locks();
|
||||
@ -696,10 +694,10 @@ asmlinkage int vprintk(const char *fmt, va_list args)
|
||||
spin_lock(&logbuf_lock);
|
||||
printk_cpu = this_cpu;
|
||||
|
||||
if (printk_recursion_bug) {
|
||||
printk_recursion_bug = 0;
|
||||
strcpy(printk_buf, printk_recursion_bug_msg);
|
||||
printed_len = sizeof(printk_recursion_bug_msg);
|
||||
if (recursion_bug) {
|
||||
recursion_bug = 0;
|
||||
strcpy(printk_buf, recursion_bug_msg);
|
||||
printed_len = sizeof(recursion_bug_msg);
|
||||
}
|
||||
/* Emit the output into the temporary buffer */
|
||||
printed_len += vscnprintf(printk_buf + printed_len,
|
||||
|
Loading…
Reference in New Issue
Block a user