[PATCH] panic_blink and i8042 unloading

From: Dmitry Torokhov
Date: Sun Nov 07 2004 - 01:36:25 EST


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@xxxxxx, 2004-11-06 22:53:46-05:00, dtor_core@xxxxxxxxxxxxx
If panic_blink is NULL set it to no_blink before using.

Signed-off-by: Dmitry Torokhov <dtor@xxxxxxx>


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)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/