[3.5.y.z extended stable] Patch "intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Mon Mar 31 12:57:05 UTC 2014
This is a note to let you know that I have just added a patch titled
intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From b405ad5642840b37a953db5d741e550096aa035c Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>
Date: Thu, 16 Aug 2012 22:06:55 +0200
Subject: intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing
it.
commit 3735d524da64b70b41c764359da36f88aded3610 upstream.
If the machine is booted without any cpu_idle driver set
(b/c disable_cpuidle() has been called) we should follow
other users of cpu_idle API and check the return value
for NULL before using it.
Reported-and-tested-by: Mark van Dijk <mark at internecto.net>
Suggested-by: Jan Beulich <JBeulich at suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk at oracle.com>
Signed-off-by: Rafael J. Wysocki <rjw at sisk.pl>
Cc: Daniel Kiper <daniel.kiper at oracle.com>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/idle/intel_idle.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 674e352..9b09185 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -592,8 +592,9 @@ static int __init intel_idle_init(void)
intel_idle_cpuidle_driver_init();
retval = cpuidle_register_driver(&intel_idle_driver);
if (retval) {
+ struct cpuidle_driver *drv = cpuidle_get_driver();
printk(KERN_DEBUG PREFIX "intel_idle yielding to %s",
- cpuidle_get_driver()->name);
+ drv ? drv->name : "none");
return retval;
}
--
1.9.1
More information about the kernel-team
mailing list