]> git.karo-electronics.de Git - linux-beck.git/commitdiff
x86: Fixed NULL function pointer dereference in AMD microcode patch loader.
authorPeter Oruba <peter.oruba@amd.com>
Fri, 1 Aug 2008 10:46:46 +0000 (12:46 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 15 Aug 2008 15:18:46 +0000 (17:18 +0200)
Dereference took place in code part responsible for manual installation
of microcode patches through /dev/cpu/microcode.

Signed-off-by: Peter Oruba <peter.oruba@amd.com>
Cc: Peter Oruba <peter.oruba@amd.com>
Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/microcode.c

index 39961bb83293c220294061f92a9836ed436621d7..ad136ad99cb38a37b3ccbd9b81b39786e4a149aa 100644 (file)
@@ -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;
                /*