From: Peter Oruba Date: Fri, 1 Aug 2008 10:46:46 +0000 (+0200) Subject: x86: Fixed NULL function pointer dereference in AMD microcode patch loader. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=636a31781684d0f49208aa163f1a5a3a74210eb4;p=linux-beck.git x86: Fixed NULL function pointer dereference in AMD microcode patch loader. Dereference took place in code part responsible for manual installation of microcode patches through /dev/cpu/microcode. Signed-off-by: Peter Oruba Cc: Peter Oruba Cc: Tigran Aivazian Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 39961bb83293..ad136ad99cb3 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c @@ -127,7 +127,8 @@ static int do_microcode_update(void) old = current->cpus_allowed; while ((cursor = microcode_ops->get_next_ucode(&new_mc, cursor)) > 0) { - error = microcode_ops->microcode_sanity_check(new_mc); + if (microcode_ops->microcode_sanity_check != NULL) + error = microcode_ops->microcode_sanity_check(new_mc); if (error) goto out; /*