public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] panic_blink and i8042 unloading
@ 2004-11-07  6:34 Dmitry Torokhov
  2004-11-07 10:14 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Torokhov @ 2004-11-07  6:34 UTC (permalink / raw)
  To: LKML; +Cc: Andrew Morton, Andi Kleen

Hi,

At unload i8042 sets panic_blink to 0. This will cause problems if kernel
panics later as it will just use it assuming that the pointer is correct.

Please consider the patch below that checks if panic_blink is NULL right
in panic() and sets it to no_blink instead.
 
-- 
Dmitry


===================================================================


ChangeSet@1.1956, 2004-11-06 22:53:46-05:00, dtor_core@ameritech.net
  If panic_blink is NULL set it to no_blink before using.
  
  Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


 panic.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


===================================================================



diff -Nru a/kernel/panic.c b/kernel/panic.c
--- a/kernel/panic.c	2004-11-07 01:31:36 -05:00
+++ b/kernel/panic.c	2004-11-07 01:31:36 -05:00
@@ -42,7 +42,7 @@
 }
 
 /* Returns how long it waited in ms */
-long (*panic_blink)(long time) = no_blink;
+long (*panic_blink)(long time);
 EXPORT_SYMBOL(panic_blink);
 
 /**
@@ -75,7 +75,10 @@
 	smp_send_stop();
 #endif
 
-       notifier_call_chain(&panic_notifier_list, 0, buf);
+	notifier_call_chain(&panic_notifier_list, 0, buf);
+
+	if (!panic_blink)
+		panic_blink = no_blink;
 
 	if (panic_timeout > 0)
 	{

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-07 10:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-07  6:34 [PATCH] panic_blink and i8042 unloading Dmitry Torokhov
2004-11-07 10:14 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox