aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaotian Feng <[email protected]>2011-03-29 16:34:32 +0800
committerIngo Molnar <[email protected]>2011-03-29 11:12:04 +0200
commit4ac5fc6a3e4d90120f292526bcaa5ee182a7411b (patch)
treea1b418e13fb87549b63645657a21cd49a44e04f6
parentca444564a947034557a85357b3911d067cac4b8f (diff)
x86, microcode: Unregister syscore_ops after microcode unloaded
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 <[email protected]> Cc: Tigran Aivazian <[email protected]> Cc: Rafael J. Wysocki <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
-rw-r--r--arch/x86/kernel/microcode_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kernel/microcode_core.c b/arch/x86/kernel/microcode_core.c
index 5ed0ab549eb8..f9242800bc84 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);