This is a note to let you know that I've just added the patch titled
cpuidle: Check the result of cpuidle_get_driver() against NULL
to the 3.10-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
cpuidle-check-the-result-of-cpuidle_get_driver-against-null.patch
and it can be found in the queue-3.10 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 3b9c10e98021e1f92e6f8c7ce1778b86ba68db10 Mon Sep 17 00:00:00 2001
From: Daniel Fu <[email protected]>
Date: Fri, 30 Aug 2013 19:48:22 +0800
Subject: cpuidle: Check the result of cpuidle_get_driver() against NULL
From: Daniel Fu <[email protected]>
commit 3b9c10e98021e1f92e6f8c7ce1778b86ba68db10 upstream.
If the current CPU has no cpuidle driver, drv will be NULL in
cpuidle_driver_ref(). Check if that is the case before trying
to bump up the driver's refcount to prevent the kernel from
crashing.
[rjw: Subject and changelog]
Signed-off-by: Daniel Fu <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
Cc: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/cpuidle/driver.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -251,7 +251,8 @@ struct cpuidle_driver *cpuidle_driver_re
spin_lock(&cpuidle_driver_lock);
drv = cpuidle_get_driver();
- drv->refcnt++;
+ if (drv)
+ drv->refcnt++;
spin_unlock(&cpuidle_driver_lock);
return drv;
Patches currently in stable-queue which might be from [email protected] are
queue-3.10/cpuidle-check-the-result-of-cpuidle_get_driver-against-null.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html