lkml.org 
[lkml]   [2011]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] x86, microcode: unregister syscore_ops after microcode unloaded
Date
Currently, microcode doesn't unregister syscore_ops after it's unloaded.
So if we modprobe then rmmod microcode, the stale microcode syscore_ops info
will stay on syscore_ops_list. Later when we're trying to reboot/halt/shutdown
the machine, kernel will panic on syscore_shutdown(). With the patch
applied, I can reboot/halt/shutdown my machine successfully.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/x86/kernel/microcode_core.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 5ed0ab5..f924280 100644
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -550,6 +550,7 @@ static void __exit microcode_exit(void)
microcode_dev_exit();

unregister_hotcpu_notifier(&mc_cpu_notifier);
+ unregister_syscore_ops(&mc_syscore_ops);

get_online_cpus();
mutex_lock(&microcode_mutex);
--
1.7.1


\
 
 \ /
  Last update: 2011-03-29 10:37    [W:0.026 / U:0.676 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site