[PATCH] console blanking oops fix
authorJan Beulich <JBeulich@novell.com>
Fri, 17 Jun 2005 20:20:58 +0000 (13:20 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 18 Jun 2005 20:33:01 +0000 (13:33 -0700)
When significant delays happen during boot (e.g.  with a kernel debugger,
but the problem has also seen in other cases) the timeout for blanking the
console may trigger, but the work scheduler may not have been initialized,
yet.  schedule_work() will oops over the null keventd_wq.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/char/vt.c

index e5ef1df..d7aa7a2 100644 (file)
@@ -2867,6 +2867,10 @@ void unblank_screen(void)
  */
 static void blank_screen_t(unsigned long dummy)
 {
+       if (unlikely(!keventd_up())) {
+               mod_timer(&console_timer, jiffies + blankinterval);
+               return;
+       }
        blank_timer_expired = 1;
        schedule_work(&console_work);
 }