Skip to contentSkip to conversation

panic_blink and i8042 unloading

PATCH In review Dmitry Torokhov 2 participants 2 messages Nov 7, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 panic_blink and i8042 unloading

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.

Signature · 44 lines
Dmitry


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


[email protected], 2004-11-06 22:53:46-05:00, [email protected]
  If panic_blink is NULL set it to no_blink before using.
  
  Signed-off-by: Dmitry Torokhov <[email protected]>


 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)
 	{
#1 lore raw
Quoted 7 lines · Dmitry Torokhov

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.

Thanks, looks good.

-Andi