public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode()
@ 2011-02-18  9:17 Dan Carpenter
  2011-02-18  9:39 ` Borislav Petkov
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dan Carpenter @ 2011-02-18  9:17 UTC (permalink / raw)
  To: Andreas Herrmann
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Borislav Petkov,
	maintainer:X86 ARCHITECTURE..., open list:AMD MICROCODE UPD...,
	open list, kernel-janitors

install_equiv_cpu_table() returns type int.  It uses negative error
codes so using an unsigned type breaks the error handling.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index 9fb8405..c561038 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -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;

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

end of thread, other threads:[~2011-02-20 19:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-18  9:17 [patch -next] x86, microcode, AMD: signedness bug in generic_load_microcode() Dan Carpenter
2011-02-18  9:39 ` Borislav Petkov
2011-02-20 13:02 ` Ingo Molnar
2011-02-20 13:09   ` Dan Carpenter
2011-02-20 14:14   ` Borislav Petkov
2011-02-20 17:50     ` Matthew Wilcox
2011-02-20 18:08       ` Borislav Petkov
2011-02-20 18:42         ` Matthew Wilcox
2011-02-20 19:33           ` Borislav Petkov
2011-02-20 13:07 ` [tip:x86/microcode] x86, microcode, AMD: Fix " tip-bot for Dan Carpenter

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