Commit 1396fa9c authored by Dan Carpenter's avatar Dan Carpenter Committed by Ingo Molnar

x86, microcode, AMD: Fix signedness bug in generic_load_microcode()

install_equiv_cpu_table() returns type int.  It uses negative
error codes so using an unsigned type breaks the error handling.
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Acked-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
Cc: open list:AMD MICROCODE UPD... <amd64-microcode@amd64.org>
Cc: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20110218091716.GA4384@bicker>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 44d60c0f
......@@ -246,7 +246,7 @@ generic_load_microcode(int cpu, const u8 *data, size_t size)
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
struct microcode_header_amd *mc_hdr = NULL;
unsigned int mc_size, leftover;
unsigned long offset;
int offset;
const u8 *ucode_ptr = data;
void *new_mc = NULL;
unsigned int new_rev = uci->cpu_sig.rev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment