Re: [PATCH] allow the highest frequency if bios think so.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 21, 2006 at 07:08:57AM -0800, Pallipadi, Venkatesh wrote:
> Hmmm Great find.....
> A perfect example of the bug that was quietly hiding
> under our noses all these years....

Indeed.  I'm actually still surprised why I haven't found it in the
past.

> 
> >>  	if (ppc > pr->performance->state_count)
> >
> >BTW I'm wondering if this check should be :
> >	if (ppc >= pr->performance->state_count)
> >>  		goto out;
> >
> 
> Yes. I think this should change to >= as well.
> Otherwise indexing states with this ppc can go out of bounds.
> 

Updated.

Correct bound checking from the value returned from _PPC method.

Signed-off-by: Bruno Ducrot <ducrot@xxxxxxxxxxxx>

--- linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	2006/11/21 10:18:39	1.1
+++ linux-2.6.19-rc6/drivers/acpi/processor_perflib.c	2006/11/21 16:28:04
@@ -83,10 +83,8 @@ static int acpi_processor_ppc_notifier(s
 		goto out;
 
 	ppc = (unsigned int)pr->performance_platform_limit;
-	if (!ppc)
-		goto out;
 
-	if (ppc > pr->performance->state_count)
+	if (ppc >= pr->performance->state_count)
 		goto out;
 
 	cpufreq_verify_within_limits(policy, 0,

-- 
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux