Skip to contentSkip to conversation

[PATCH]

PATCH New Jan Beulich 1 participant 1 message Jun 15, 2005 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 [PATCH]

(Note: Patch also attached because the inline version is certain to get line wrapped.)

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. This previously led to a page fault due to a NULL pointer access.

drivers/char/vt.c +4 -0
diff -Npru linux-2.6.12-rc6.base/drivers/char/vt.c linux-2.6.12-rc6/drivers/char/vt.c
@@ -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);
 }

(Note: Patch also attached because the inline version is certain to get line wrapped.)

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. This previously led to a page fault due to a NULL pointer access.

drivers/char/vt.c +4 -0
diff -Npru linux-2.6.12-rc6.base/drivers/char/vt.c linux-2.6.12-rc6/drivers/char/vt.c
@@ -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);
 }