gentoo-overlay/sys-kernel/linux-hardened-sources/files/5.4/000129_0129-fix-bug-in-ucod...

27 lines
912 B
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jim Kukunas <james.t.kukunas@linux.intel.com>
Date: Sat, 2 Nov 2019 00:59:52 +0000
Subject: [PATCH] fix bug in ucode force reload revision check
If force_ucode_load==true, reload ucode even if revision # is identical.
---
arch/x86/kernel/cpu/microcode/intel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 5c67ac023f4a..2ca566bedfc8 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -865,7 +865,7 @@ static enum ucode_state apply_microcode_intel(int cpu)
* already.
*/
rev = intel_get_microcode_revision();
- if (rev >= mc->hdr.rev) {
+ if (rev > mc->hdr.rev || (rev == mc->hdr.rev && !force_ucode_load)) {
ret = UCODE_OK;
goto out;
}
--
https://clearlinux.org