Re: [PATCH]: ACPI: Add the module param check for processor.max_cstate

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

 



On Fri, 2009-04-24 at 11:24 +0800, Len Brown wrote:
> From: Len Brown <len.brown@xxxxxxxxx>
> Subject: [PATCH] ACPI: prevent processor.max_cstate=0 boot crash
> 
> As processor.max_cstate is an init-time-only modparam,
> sanity checking it at init-time is sufficient.
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=13142
This is also OK. And it is easier.

Thanks.
> 
> Signed-off-by: Len Brown <len.brown@xxxxxxxxx>
> ---
>  drivers/acpi/processor_idle.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
> index 6fe1214..436127e 100644
> --- a/drivers/acpi/processor_idle.c
> +++ b/drivers/acpi/processor_idle.c
> @@ -1037,6 +1037,9 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr)
>  		dev->states[i].desc[0] = '\0';
>  	}
>  
> +	if (max_cstate == 0)
> +		max_cstate = 1;
> +
>  	for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
>  		cx = &pr->power.states[i];
>  		state = &dev->states[count];

--
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