Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e3e8a75d2acfc61ebf25524666a0a2c6abb0620c
Commit:     e3e8a75d2acfc61ebf25524666a0a2c6abb0620c
Parent:     cefc8be82403cfc4325e7b9b063f77dc0f34e19e
Author:     Kirill Korotaev <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 01:46:19 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Sun Feb 11 10:51:34 2007 -0800

    [PATCH] Extract and use wake_up_klogd()
    
    Remove hack with printing space to wake up klogd.  Use explicit
    wake_up_klogd().
    
    See earlier discussion
    
http://groups.google.com/group/fa.linux.kernel/browse_frm/thread/75f496668409f58d/1a8f28983a51e1ff?lnk=st&q=wake_up_klogd+group%3Afa.linux.kernel&rnum=2#1a8f28983a51e1ff
    
    Signed-off-by: Alexey Dobriyan <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/kernel.h |    1 +
 kernel/printk.c        |   10 ++++++++--
 lib/bust_spinlocks.c   |   10 +---------
 3 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7e86130..e91dce7 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -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;
diff --git a/kernel/printk.c b/kernel/printk.c
index 3e79e18..4da26b0 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -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
  *
@@ -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);
 
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
index 0ee968e..accb356 100644
--- a/lib/bust_spinlocks.c
+++ b/lib/bust_spinlocks.c
@@ -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();
        }
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to