linux-stable/drivers/base
Rafael J. Wysocki 69e445ab8b PM / core: Clear the direct_complete flag on errors
If __device_suspend() runs asynchronously (in which case the device
passed to it is in dpm_suspended_list at that point) and it returns
early on an error or pending wakeup, and the power.direct_complete
flag has been set for the device already, the subsequent
device_resume() will be confused by that and it will call
pm_runtime_enable() incorrectly, as runtime PM has not been
disabled for the device by __device_suspend().

To avoid that, clear power.direct_complete if __device_suspend()
is not going to disable runtime PM for the device before returning.

Fixes: aae4518b31 (PM / sleep: Mechanism to avoid resuming runtime-suspended devices unnecessarily)
Reported-by: Al Cooper <alcooperx@gmail.com>
Tested-by: Al Cooper <alcooperx@gmail.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: 3.16+ <stable@vger.kernel.org> # 3.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-10-04 19:39:31 +02:00
..
firmware_loader firmware: Fix security issue with request_firmware_into_buf() 2018-09-12 09:31:00 +02:00
power PM / core: Clear the direct_complete flag on errors 2018-10-04 19:39:31 +02:00
regmap regmap: Support non-incrementing registers 2018-08-09 11:15:06 +01:00
test
arch_topology.c
attribute_container.c
base.h driver core: remove unnecessary function extern declare 2018-07-16 13:32:20 +02:00
bus.c
cacheinfo.c drivers: base: cacheinfo: use OF property_read_u32 instead of get_property,read_number 2018-07-07 17:20:47 +02:00
class.c
component.c
container.c
core.c Driver core patches for 4.19-rc1 2018-08-18 11:44:53 -07:00
cpu.c x86/speculation/l1tf: Add sysfs reporting for l1tf 2018-06-20 19:10:00 +02:00
dd.c Merge 4.18-rc7 into driver-core-next 2018-07-30 10:08:09 +02:00
devcon.c
devcoredump.c
devres.c device: Use overflow helpers for devm_kmalloc() 2018-06-05 12:16:51 -07:00
devtmpfs.c
driver.c
firmware.c
hypervisor.c
init.c base: fix order of OF initialization 2018-07-07 17:54:29 +02:00
isa.c
Kconfig
Makefile dma-mapping: move all DMA mapping code to kernel/dma 2018-06-14 08:50:37 +02:00
map.c
memory.c memory_hotplug: fix kernel_panic on offline page processing 2018-09-04 16:45:02 -07:00
module.c
node.c mm/memory_hotplug.c: drop unnecessary checks from register_mem_sect_under_node() 2018-08-17 16:20:29 -07:00
pinctrl.c
platform-msi.c
platform.c
property.c
soc.c
syscore.c
topology.c
transport_class.c