]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify
authorJon Medhurst (Tixy) <tixy@linaro.org>
Wed, 15 Aug 2012 20:11:00 +0000 (22:11 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Wed, 15 Aug 2012 20:11:00 +0000 (22:11 +0200)
commit1b2e203ac4113c558c31afe4dc2a88a5cfeabeb7
tree6e849f1570d0d12d3408976e3a6c3f95cdcc8817
parent9560eb5ec3e8c2729327847d6ac55788538c558a
cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify

When a kernel is built to support multiple hardware types it's possible
that CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is set but the hardware the
kernel is run on doesn't support cpuidle and therefore doesn't load a
driver for it. In this case, when the system is shut down,
cpuidle_coupled_cpu_notify() gets called with cpuidle_devices set to
NULL. There are quite possibly other circumstances where this
situation can also occur and we should check for it.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/cpuidle/coupled.c