linux-stable/drivers/base
Rafael J. Wysocki d7ee5bfb55 driver core: Do not resume suppliers under device_links_write_lock()
[ Upstream commit 5db25c9eb8 ]

It is incorrect to call pm_runtime_get_sync() under
device_links_write_lock(), because it may end up trying to take
device_links_read_lock() while resuming the target device and that
will deadlock in the non-SRCU case, so avoid that by resuming the
supplier device in device_link_add() before calling
device_links_write_lock().

Fixes: 21d5c57b37 ("PM / runtime: Use device links")
Fixes: baa8809f60 ("PM / runtime: Optimize the use of device links")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-27 14:46:15 +01:00
..
power PM / Domains: Deal with multiple states but no governor in genpd 2019-12-01 09:13:38 +01:00
regmap regmap: fix bulk writes on paged registers 2019-07-31 07:28:25 +02:00
test License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
arch_topology.c Revert "base: arch_topology: fix section mismatch build warnings" 2018-04-08 14:26:32 +02:00
attribute_container.c
base.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bus.c kobject: return error code if writing /sys/.../uevent fails 2019-02-12 19:46:02 +01:00
cacheinfo.c drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT 2019-07-21 09:04:16 +02:00
class.c
component.c component: fix loop condition to call unbind() if bind() fails 2019-11-20 18:00:01 +01:00
container.c
core.c driver core: Do not resume suppliers under device_links_write_lock() 2020-01-27 14:46:15 +01:00
cpu.c x86/bugs: Add ITLB_MULTIHIT bug infrastructure 2019-11-12 19:19:03 +01:00
dd.c driver core: Postpone DMA tear-down until after devres release for probe failure 2019-05-25 18:25:37 +02:00
devcoredump.c
devres.c devres: Align data[] to ARCH_KMALLOC_MINALIGN 2019-05-16 19:42:29 +02:00
devtmpfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-coherent.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma-contiguous.c
dma-mapping.c dma-coherent: remove the DMA_MEMORY_MAP and DMA_MEMORY_IO flags 2017-09-01 11:59:17 +02:00
driver.c
firmware.c
firmware_class.c Revert "firmware: add sanity check on shutdown/suspend" 2017-09-10 21:19:06 -07:00
hypervisor.c
init.c
isa.c isa: Prevent NULL dereference in isa_bus driver callbacks 2017-12-14 09:52:51 +01:00
Kconfig dma-buf/fence: Fix lock inversion within dma-fence-array 2018-03-19 08:42:47 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
map.c
memory.c mm/memory_hotplug: Do not unlock when fails to take the device_hotplug_lock 2019-12-01 09:14:14 +01:00
module.c
node.c mm: hide incomplete nr_indirectly_reclaimable in sysfs 2019-04-20 09:15:10 +02:00
pinctrl.c
platform-msi.c platform-msi: Free descriptors in platform_msi_domain_free() 2019-01-09 17:14:48 +01:00
platform.c drivers/base/platform.c: kmemleak ignore a known leak 2019-12-05 15:37:53 +01:00
property.c ACPI: properties: Align return codes of __acpi_node_get_property_reference() 2017-10-11 21:15:44 +02:00
soc.c base: soc: Export soc_device_register/unregister APIs 2019-10-05 12:47:47 +02:00
syscore.c
topology.c base: topology: constify attribute_group structures. 2017-08-28 17:49:22 +02:00
transport_class.c