Applied: [Quantal][PATCH 1/1] UBUNTU: SAUCE: cpuidle: Fix NULL pointer dereference when off-lining CPU's

Leann Ogasawara leann.ogasawara at canonical.com
Fri Apr 12 17:48:28 UTC 2013


Applied to Quantal master-next.

Thanks,
Leann

On 04/12/2013 10:05 AM, leann.ogasawara at canonical.com wrote:
> From: Leann Ogasawara <leann.ogasawara at canonical.com>
>
> BugLink: http://bugs.launchpad.net/bugs/1168452
>
> When off-lining CPU's on some multi-processor systems (eg. DL385p Gen 8)
> we hit a NULL pointer dereference kernel oops.  This is resolved by
> checking the device pointer prior to it ever being used.
>
> Signed-off-by: Leann Ogasawara <leann.ogasawara at canonical.com>
> ---
>  drivers/cpuidle/cpuidle.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
> index d90519c..dd4816b 100644
> --- a/drivers/cpuidle/cpuidle.c
> +++ b/drivers/cpuidle/cpuidle.c
> @@ -72,7 +72,7 @@ int cpuidle_play_dead(void)
>  	int i, dead_state = -1;
>  	int power_usage = -1;
>  
> -	if (!drv)
> +	if (!drv || !dev)
>  		return -ENODEV;
>  
>  	/* Find lowest-power state that supports long-term idle */





More information about the kernel-team mailing list