From: Zhenzhong Duan Date: Fri, 1 Jun 2018 06:47:53 +0000 (+0800) Subject: x86/microcode/intel: Fix a wrong assignment of revision in _save_mc X-Git-Tag: v4.1.12-124.31.3~353 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b079cf8fde8b53c3fd10287594c28ba8baedd42c;p=users%2Fjedix%2Flinux-maple.git x86/microcode/intel: Fix a wrong assignment of revision in _save_mc We should compare revision of saved microcode with current, or else revision_is_newer() always return false. Orabug: 28190263 Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Signed-off-by: Brian Maly --- diff --git a/arch/x86/kernel/cpu/microcode/intel_early.c b/arch/x86/kernel/cpu/microcode/intel_early.c index 2f49ab4ac0ae..c157a1ebf630 100644 --- a/arch/x86/kernel/cpu/microcode/intel_early.c +++ b/arch/x86/kernel/cpu/microcode/intel_early.c @@ -255,7 +255,7 @@ static unsigned int _save_mc(struct microcode_intel **mc_saved, mc_saved_hdr = (struct microcode_header_intel *)mc_saved[i]; sig = mc_saved_hdr->sig; pf = mc_saved_hdr->pf; - new_rev = mc_hdr->rev; + new_rev = mc_saved_hdr->rev; if (!get_matching_sig(sig, pf, new_rev, ucode_ptr)) continue;