linux/arch/x86/kernel/cpu/microcode
Boris Ostrovsky da63865a01 x86, microcode: Return error from driver init code when loader is disabled
Commits 65cef1311d ("x86, microcode: Add a disable chicken bit") and
a18a0f6850 ("x86, microcode: Don't initialize microcode code on
paravirt") allow microcode driver skip initialization when microcode
loading is not permitted.

However, they don't prevent the driver from being loaded since the
init code returns 0. If at some point later the driver gets unloaded
this will result in an oops while trying to deregister the (never
registered) device.

To avoid this, make init code return an error on paravirt or when
microcode loading is disabled. The driver will then never be loaded.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Link: http://lkml.kernel.org/r/1422411669-25147-1-git-send-email-boris.ostrovsky@oracle.com
Reported-by: James Digwall <james@dingwall.me.uk>
Cc: stable@vger.kernel.org # 3.18
Signed-off-by: Borislav Petkov <bp@suse.de>
2015-01-28 09:23:40 +01:00
..
Makefile x86, microcode: Move to a proper location 2014-01-13 20:00:12 +01:00
amd.c x86, microcode, AMD: Do not use smp_processor_id() in preemtible context 2014-12-01 11:51:05 +01:00
amd_early.c x86, microcode: Reload microcode on resume 2014-12-06 13:03:03 +01:00
core.c x86, microcode: Return error from driver init code when loader is disabled 2015-01-28 09:23:40 +01:00
core_early.c x86, microcode: Reload microcode on resume 2014-12-06 13:03:03 +01:00
intel.c x86, microcode, intel: Rename apply_microcode and declare it static 2014-07-25 17:57:51 +02:00
intel_early.c x86/microcode/intel: Fish out the stashed microcode for the BSP 2014-12-10 11:36:28 +01:00
intel_lib.c x86, microcode: Move to a proper location 2014-01-13 20:00:12 +01:00