linux-yocto/drivers/base
Rafael J. Wysocki 7992a8c946 PM: runtime: Do not clear needs_force_resume with enabled runtime PM
commit 359afc8eb02a518fbdd0cbd462c8c2827c6cbec2 upstream.

Commit 89d9cec3b1 ("PM: runtime: Clear power.needs_force_resume in
pm_runtime_reinit()") added provisional clearing of power.needs_force_resume
to pm_runtime_reinit(), but it is done unconditionally which is a
mistake because pm_runtime_reinit() may race with driver probing
and removal [1].

To address this, notice that power.needs_force_resume should never
be set when runtime PM is enabled and so it only needs to be cleared
when runtime PM is disabled, and update pm_runtime_init() to only
clear that flag when runtime PM is disabled.

Fixes: 89d9cec3b1 ("PM: runtime: Clear power.needs_force_resume in pm_runtime_reinit()")
Reported-by: Ed Tsai <ed.tsai@mediatek.com>
Closes: https://lore.kernel.org/linux-pm/20251215122154.3180001-1-ed.tsai@mediatek.com/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Cc: 6.17+ <stable@vger.kernel.org> # 6.17+
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://patch.msgid.link/12807571.O9o76ZdvQC@rafael.j.wysocki
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-02 12:57:22 +01:00
..
firmware_loader firmware_loader: make RUST_FW_LOADER_ABSTRACTIONS select FW_LOADER 2025-12-18 14:03:21 +01:00
power PM: runtime: Do not clear needs_force_resume with enabled runtime PM 2026-01-02 12:57:22 +01:00
regmap regmap: slimbus: fix bus_context pointer in regmap init calls 2025-10-23 15:19:58 +01:00
test
arch_numa.c
arch_topology.c arch_topology: Fix incorrect error check in topology_parse_cpu_capacity() 2025-10-22 08:06:28 +02:00
attribute_container.c
auxiliary_sysfs.c
auxiliary.c driver core: auxiliary bus: Optimize logic of auxiliary_match_id() 2025-09-06 20:12:36 +02:00
base.h PM: sleep: Do not wait on SYNC_STATE_ONLY device links 2025-09-27 14:10:51 +02:00
bus.c
cacheinfo.c
class.c
component.c
container.c
core.c driver core: fw_devlink: Don't warn about sync_state() pending 2025-10-17 09:47:40 +02:00
cpu.c Merge 6.17-rc6 into driver-core-next 2025-09-15 08:26:05 +02:00
dd.c
devcoredump.c devcoredump: Fix circular locking dependency with devcd->mutex. 2025-10-17 09:47:40 +02:00
devres.c devres: provide devm_kmemdup_const() 2025-09-08 14:21:23 +02:00
devtmpfs.c VFS: rename kern_path_locked() and related functions. 2025-09-23 12:37:36 +02:00
driver.c
faux.c driver core: faux: Set power.no_pm for faux devices 2025-09-06 13:58:00 +02:00
firmware.c
hypervisor.c
init.c
isa.c
Kconfig PM: runtime: Add basic kunit tests for API contracts 2025-09-27 13:41:47 +02:00
Makefile
map.c
memory.c drivers/base: move memory_block_add_nid() into the caller 2025-10-03 16:42:43 -07:00
module.c
node.c Only two patch series in this pull request: 2025-10-05 12:11:07 -07:00
physical_location.c
physical_location.h
pinctrl.c
platform-msi.c
platform.c
property.c ACPI: Add support for nargs_prop in acpi_fwnode_get_reference_args() 2025-09-25 19:48:47 -06:00
soc.c
swnode.c software node: Constify node_group in registration functions 2025-08-17 13:18:07 +02:00
syscore.c
topology.c
trace.c
trace.h
transport_class.c