public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] x86, AMD: fix error path in apply_microcode_amd()
@ 2013-07-23 20:58 Torsten Kaiser
  2013-07-24  8:00 ` Borislav Petkov
  2013-07-31 17:30 ` [tip:x86/urgent] x86, amd, microcode: Fix " tip-bot for Torsten Kaiser
  0 siblings, 2 replies; 3+ messages in thread
From: Torsten Kaiser @ 2013-07-23 20:58 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Borislav Petkov,
	Jacob Shin, Johannes Hirte, linux-kernel

Return -1 (like Intels apply_microcode) when the loading fails, also
do not set the active microcode level on failure.

Signed-off-by: Torsten Kaiser <just.for.lkml@googlemail.com>

--- a/arch/x86/kernel/microcode_amd.c	2013-07-23 19:42:16.089517717 +0200
+++ b/arch/x86/kernel/microcode_amd.c	2013-07-23 19:43:30.359517091 +0200
@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu)
 		return 0;
 	}
 
-	if (__apply_microcode_amd(mc_amd))
+	if (__apply_microcode_amd(mc_amd)) {
 		pr_err("CPU%d: update failed for patch_level=0x%08x\n",
 			cpu, mc_amd->hdr.patch_id);
-	else
-		pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
-			mc_amd->hdr.patch_id);
+		return -1;
+	}
+	pr_info("CPU%d: new patch_level=0x%08x\n", cpu,
+		mc_amd->hdr.patch_id);
 
 	uci->cpu_sig.rev = mc_amd->hdr.patch_id;
 	c->microcode = mc_amd->hdr.patch_id;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-31 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 20:58 [PATCH 1/5] x86, AMD: fix error path in apply_microcode_amd() Torsten Kaiser
2013-07-24  8:00 ` Borislav Petkov
2013-07-31 17:30 ` [tip:x86/urgent] x86, amd, microcode: Fix " tip-bot for Torsten Kaiser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox