From: Andi Kleen <ak@suse.de>
To: Adrian Bunk <bunk@stusta.de>
Cc: Jacob Shin <jacob.shin@amd.com>, Dave Jones <davej@redhat.com>,
Thomas Renninger <trenn@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] arch/i386/kernel/cpu/cpufreq/powernow-k8.c: fix a check-after-use
Date: Wed, 19 Apr 2006 00:14:15 +0200 [thread overview]
Message-ID: <200604190014.15515.ak@suse.de> (raw)
In-Reply-To: <20060418220728.GU11582@stusta.de>
On Wednesday 19 April 2006 00:07, Adrian Bunk wrote:
> This patch fixes a check-after-use introduced by commit
> 4211a30349e8d2b724cfb4ce2584604f5e59c299 and spotted by the Coverity
> checker.
Good catch. Should probably go into 2.6.17
-Andi
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
> ---
>
> arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> --- linux-2.6.17-rc1-mm3-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c.old 2006-04-18 20:32:27.000000000 +0200
> +++ linux-2.6.17-rc1-mm3-full/arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2006-04-18 20:33:02.000000000 +0200
> @@ -905,14 +905,17 @@ static int powernowk8_target(struct cpuf
> {
> cpumask_t oldmask = CPU_MASK_ALL;
> struct powernow_k8_data *data = powernow_data[pol->cpu];
> - u32 checkfid = data->currfid;
> - u32 checkvid = data->currvid;
> + u32 checkfid;
> + u32 checkvid;
> unsigned int newstate;
> int ret = -EIO;
>
> if (!data)
> return -EINVAL;
>
> + checkfid = data->currfid;
> + checkvid = data->currvid;
> +
> /* only run on specific CPU from here on */
> oldmask = current->cpus_allowed;
> set_cpus_allowed(current, cpumask_of_cpu(pol->cpu));
>
>
prev parent reply other threads:[~2006-04-18 22:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 22:07 [2.6 patch] arch/i386/kernel/cpu/cpufreq/powernow-k8.c: fix a check-after-use Adrian Bunk
2006-04-18 22:14 ` Andi Kleen [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=200604190014.15515.ak@suse.de \
--to=ak@suse.de \
--cc=bunk@stusta.de \
--cc=davej@redhat.com \
--cc=jacob.shin@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=trenn@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.