Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100671
b: refs/heads/master
c: 3b8945e
h: refs/heads/master
i:
  100669: 5b786cf
  100667: b3e7ae9
  100663: a00332a
  100655: 0059ef1
  100639: f25af7e
  100607: 4abbdf9
v: v3
  • Loading branch information
Tejun Heo authored and Thomas Gleixner committed May 24, 2008
1 parent e8d5f4d commit 2667a6b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 42fdfa238a23643226910acf922ea930b3286032
refs/heads/master: 3b8945e8d40645eecdb7d2357ca531f9b4dd9f71
22 changes: 10 additions & 12 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand All @@ -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,
Expand Down

0 comments on commit 2667a6b

Please sign in to comment.