linux-stable/drivers/base
Russell King df6a0d6f63 PM / domains: avoid potential oops in pm_genpd_remove_device()
pm_genpd_remove_device() tries hard to validate the generic PM domain
passed to it, but the validation is not complete.

dev->pm_domain contains a struct dev_pm_domain, which is the "base
class" of generic PM domains.  Other users of dev_pm_domains include
stuff like vga_switheroo.  Hence, a device could have a generic PM
domain or a vga_switcheroo PM domain in dev->pm_domain.

We need ot be certain that the PM domain is actually valid before we
try to remove it.  We can do this easily as we have a way to get the
current validated generic PM domain for a struct device.  This must
match the generic PM domain being requested for removal.

Convert the code to use this alternative validation method instead.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Kevin Hilman <khilman@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-03-23 23:20:28 +01:00
..
power PM / domains: avoid potential oops in pm_genpd_remove_device() 2015-03-23 23:20:28 +01:00
regmap Merge remote-tracking branches 'regmap/topic/ac97', 'regmap/topic/doc' and 'regmap/topic/smbus' into regmap-next 2015-02-08 11:16:11 +08:00
attribute_container.c attribute_container: fix coding style issues 2014-09-23 22:55:15 -07:00
base.h driver core: Move driver_data back to struct device 2014-05-27 12:37:18 -07:00
bus.c driver core: Fix unbalanced device reference in drivers_probe 2014-11-07 11:17:27 -08:00
cacheinfo.c drivers/base: cacheinfo: remove noisy error boot message 2014-11-24 09:33:05 -08:00
class.c
component.c component: fix bug with legacy API 2014-07-04 18:05:05 +01:00
container.c ACPI / hotplug / driver core: Handle containers in a special way 2013-12-29 15:25:48 +01:00
core.c device: Change dev_<level> logging functions to return void 2015-01-26 15:57:59 -08:00
cpu.c drivers/base: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
dd.c driver core / PM: Add PM domain callbacks for device setup/cleanup 2015-03-22 22:14:12 +01:00
devcoredump.c devcoredump: provide a one-way disable function 2014-11-26 19:40:12 -08:00
devres.c devres: Improve devm_kasprintf()/kvasprintf() support 2014-09-23 23:32:50 -07:00
devtmpfs.c
dma-coherent.c drivers: dma-coherent: add initialization from device tree 2014-10-14 02:18:12 +02:00
dma-contiguous.c drivers: of: add return value to of_reserved_mem_device_init() 2014-10-29 16:33:14 -07:00
dma-mapping.c common: dma-mapping: introduce common remapping functions 2014-10-09 22:25:52 -04:00
driver.c Revert "core: platform: add warning if driver has no owner" 2014-11-11 14:29:38 +09:00
firmware.c
firmware_class.c driver core patches for 3.20-rc1 2015-02-15 11:11:47 -08:00
hypervisor.c
init.c ACPI / hotplug / driver core: Handle containers in a special way 2013-12-29 15:25:48 +01:00
isa.c
Kconfig cma: make default CMA area size zero for x86 2014-12-10 17:41:06 -08:00
Makefile Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
map.c
memory.c memory-hotplug: remove redundant call of page_to_pfn 2014-12-13 12:42:47 -08:00
module.c
node.c drivers/base: use %*pb[l] to print bitmaps including cpumasks and nodemasks 2015-02-13 21:21:38 -08:00
pinctrl.c
platform.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
property.c Driver core: Unified interface for firmware node properties 2014-11-04 21:58:23 +01:00
soc.c
syscore.c genirq: Simplify wakeup mechanism 2014-09-01 13:48:59 +02:00
topology.c topology: replace custom attribute macros with standard DEVICE_ATTR* 2014-11-07 11:45:00 -08:00
transport_class.c