提交 d982057f 编写于 作者: T Torsten Kaiser 提交者: H. Peter Anvin

x86, amd, microcode: Fix error path in apply_microcode_amd()

Return -1 (like Intels apply_microcode) when the loading fails, also
do not set the active microcode level on failure.
Signed-off-by: NTorsten Kaiser <just.for.lkml@googlemail.com>
Link: http://lkml.kernel.org/r/20130723225823.2e4e7588@googlemail.comAcked-by: NBorislav Petkov <bp@suse.de>
Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
上级 f155b630
...@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu) ...@@ -220,12 +220,13 @@ int apply_microcode_amd(int cpu)
return 0; 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", pr_err("CPU%d: update failed for patch_level=0x%08x\n",
cpu, mc_amd->hdr.patch_id); cpu, mc_amd->hdr.patch_id);
else return -1;
pr_info("CPU%d: new patch_level=0x%08x\n", cpu, }
mc_amd->hdr.patch_id); 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; uci->cpu_sig.rev = mc_amd->hdr.patch_id;
c->microcode = mc_amd->hdr.patch_id; c->microcode = mc_amd->hdr.patch_id;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册