Re: 2.6.2-rc2-bk1 oopses on boot (ACPI patch)

From: Andrew Morton
Date: Tue Jan 27 2004 - 21:48:46 EST


Alessandro Suardi <alessandro.suardi@xxxxxxxxxx> wrote:
>
> Already reported, but I'll do so once again, since it looks like
> in a short while I won't be able to boot official kernels in my
> current config...
>
> Original report here:
>
> http://www.ussg.iu.edu/hypermail/linux/kernel/0312.3/0442.html

Divide by zero. Looks like ACPI is now passing bad values into the
frequency change notifier.

Does this make the oops go away?

diff -puN drivers/cpufreq/cpufreq.c~cpufreq-workaround drivers/cpufreq/cpufreq.c
--- 25/drivers/cpufreq/cpufreq.c~cpufreq-workaround 2004-01-27 18:36:05.000000000 -0800
+++ 25-akpm/drivers/cpufreq/cpufreq.c 2004-01-27 18:36:42.000000000 -0800
@@ -928,6 +928,11 @@ void cpufreq_notify_transition(struct cp
return; /* Only valid if we're in the resume process where
* everyone knows what CPU frequency we are at */

+ if (freqs->new == 0) {
+ printk("%s: avoiding div-by-zero\n", __FUNCTION__);
+ return;
+ }
+
down_read(&cpufreq_notifier_rwsem);
switch (state) {
case CPUFREQ_PRECHANGE:

_

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/