From: Dominik Brodowski <linux@brodo.de>
To: Gerald Britton <gbritton@alum.mit.edu>
Cc: linux-kernel@vger.kernel.org, cpufreq@www.linux.org.uk
Subject: Re: [PATCH] Re: [2.5.39] (3/5) CPUfreq i386 drivers
Date: Sun, 29 Sep 2002 11:16:03 +0200 [thread overview]
Message-ID: <20020929111603.F1250@brodo.de> (raw)
In-Reply-To: <20020928134739.A11797@light-brigade.mit.edu>; from gbritton@alum.mit.edu on Sat, Sep 28, 2002 at 01:47:39PM -0400
On Sat, Sep 28, 2002 at 01:47:39PM -0400, Gerald Britton wrote:
> > - if (!speedstep_low_freq || !speedstep_high_freq ||
> > + if (!low || !high ||
> > (speedstep_low_freq == speedstep_high_freq))
> > return -EIO;
>
> This is still obviously broken.
>
> First time through the loop, high and low are 0, one of the two of them gets
> set and the other is still 0. This !low || !high test is still within the loop
> so it will drop out with -EIO.
Oh, thanks for pointing this out. I'll fix it for the next realease.
> I'd been using cpufreq under 2.4 for a while
> and with the recent updates (profile api), speedstep hasn't started up because
> of this, or because it was sending bad data into the notifier chains. Your
> patch here passes bogus data into the notifier chains, which could be bad imho.
Well, so far the only x86 notifier is the one in arch/i386/kernel/time.c.
But yes, you're right, it's bad; and so I'll add a workaround for this, too.
> If I fix the init by moving the !low || !high test below the loop, and prevent
> bad data from being passed into the notifier chains, I start getting memory
> corruption being detected by slab poisioning.
Any idea why this is happening??? The only dynamically allocated struct is
struct cpfureq_driver driver; and it is only kfree'd in speedstep_exit...
> /* Disable IRQs */
> local_irq_save(flags);
> local_irq_disable();
> . . .
> /* Enable IRQs */
> local_irq_enable();
> local_irq_restore(flags);
Thanks. Fixed.
BTW, unfortunately I can't test speedstep.c locally - my notebook has the
old 440?X ISSCL speedstep interface which is undocumented. So I'm really
glad whenever others test speedstep.c. Many thanks,
Dominik
next prev parent reply other threads:[~2002-09-29 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-28 9:25 [2.5.39] (3/5) CPUfreq i386 drivers Dominik Brodowski
2002-09-28 11:44 ` [PATCH] " Dominik Brodowski
2002-09-28 17:47 ` Gerald Britton
2002-09-29 9:16 ` Dominik Brodowski [this message]
2002-09-29 10:10 ` Dominik Brodowski
2002-09-29 19:56 ` Gerald Britton
2002-09-29 23:39 ` Dominik Brodowski
2002-09-30 1:01 ` Gerald Britton
2002-09-30 0:59 ` Horst von Brand
2002-09-28 22:03 ` Toon van der Pas
2002-09-29 8:38 ` Dominik Brodowski
2002-09-29 14:44 ` Toon van der Pas
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=20020929111603.F1250@brodo.de \
--to=linux@brodo.de \
--cc=cpufreq@www.linux.org.uk \
--cc=gbritton@alum.mit.edu \
--cc=linux-kernel@vger.kernel.org \
/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