Skip to content

Commit

Permalink
x86, microcode: Unregister syscore_ops after microcode unloaded
Browse files Browse the repository at this point in the history
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: Rafael J. Wysocki <rjw@sisk.pl>
LKML-Reference: <1301387672-23661-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Xiaotian Feng authored and Ingo Molnar committed Mar 29, 2011
1 parent ca44456 commit 4ac5fc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/kernel/microcode_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4ac5fc6

Please sign in to comment.