Message ID | 5432ab8845fd85aa102b127e0678d7b2e0078588.1365785549.git.leann.ogasawara@canonical.com |
---|---|
State | New |
Headers | show |
On 04/12/2013 10:05 AM, leann.ogasawara@canonical.com wrote: > From: Leann Ogasawara <leann.ogasawara@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@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 */ >
Applied to Quantal master-next. Thanks, Leann On 04/12/2013 10:05 AM, leann.ogasawara@canonical.com wrote: > From: Leann Ogasawara <leann.ogasawara@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@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 */
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 */