Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47604
b: refs/heads/master
c: e3e8a75
h: refs/heads/master
v: v3
  • Loading branch information
Kirill Korotaev authored and Linus Torvalds committed Feb 11, 2007
1 parent e36aa4c commit 063eba0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 12 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: cefc8be82403cfc4325e7b9b063f77dc0f34e19e
refs/heads/master: e3e8a75d2acfc61ebf25524666a0a2c6abb0620c
1 change: 1 addition & 0 deletions trunk/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ static inline void console_verbose(void)
}

extern void bust_spinlocks(int yes);
extern void wake_up_klogd(void);
extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
extern int panic_timeout;
extern int panic_on_oops;
Expand Down
10 changes: 8 additions & 2 deletions trunk/kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,12 @@ int is_console_locked(void)
return console_locked;
}

void wake_up_klogd(void)
{
if (!oops_in_progress && waitqueue_active(&log_wait))
wake_up_interruptible(&log_wait);
}

/**
* release_console_sem - unlock the console system
*
Expand Down Expand Up @@ -825,8 +831,8 @@ void release_console_sem(void)
console_locked = 0;
up(&console_sem);
spin_unlock_irqrestore(&logbuf_lock, flags);
if (wake_klogd && !oops_in_progress && waitqueue_active(&log_wait))
wake_up_interruptible(&log_wait);
if (wake_klogd)
wake_up_klogd();
}
EXPORT_SYMBOL(release_console_sem);

Expand Down
10 changes: 1 addition & 9 deletions trunk/lib/bust_spinlocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,11 @@ void __attribute__((weak)) bust_spinlocks(int yes)
if (yes) {
oops_in_progress = 1;
} else {
int loglevel_save = console_loglevel;
#ifdef CONFIG_VT
unblank_screen();
#endif
oops_in_progress = 0;
/*
* OK, the message is on the console. Now we call printk()
* without oops_in_progress set so that printk() will give klogd
* and the blanked console a poke. Hold onto your hats...
*/
console_loglevel = 15; /* NMI oopser may have shut the console up */
printk(" ");
console_loglevel = loglevel_save;
wake_up_klogd();
}
}

Expand Down

0 comments on commit 063eba0

Please sign in to comment.