public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Dan Carpenter <error27@gmail.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	andreas.herrmann3@amd.com, amd64-microcode@amd64.org,
	error27@gmail.com, tglx@linutronix.de, mingo@elte.hu,
	borislav.petkov@amd.com
Subject: [tip:x86/microcode] x86, microcode, AMD: Fix signedness bug in generic_load_microcode()
Date: Sun, 20 Feb 2011 13:07:36 GMT	[thread overview]
Message-ID: <tip-1396fa9cd2e34669253b7ca8c75f12103481f71c@git.kernel.org> (raw)
In-Reply-To: <20110218091716.GA4384@bicker>

Commit-ID:  1396fa9cd2e34669253b7ca8c75f12103481f71c
Gitweb:     http://git.kernel.org/tip/1396fa9cd2e34669253b7ca8c75f12103481f71c
Author:     Dan Carpenter <error27@gmail.com>
AuthorDate: Fri, 18 Feb 2011 12:17:16 +0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 20 Feb 2011 14:01:32 +0100

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: Dan Carpenter <error27@gmail.com>
Acked-by: Borislav 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: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/microcode_amd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;

      parent reply	other threads:[~2011-02-20 13:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Dan Carpenter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-1396fa9cd2e34669253b7ca8c75f12103481f71c@git.kernel.org \
    --to=error27@gmail.com \
    --cc=amd64-microcode@amd64.org \
    --cc=andreas.herrmann3@amd.com \
    --cc=borislav.petkov@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox