Files
kernel_arpi/include/linux
Rafael J. Wysocki fddbdd20c8 PM: runtime: Add safety net to supplier device release
[ Upstream commit d1579e61192e0e686faa4208500ef4c3b529b16c ]

Because refcount_dec_not_one() returns true if the target refcount
becomes saturated, it is generally unsafe to use its return value as
a loop termination condition, but that is what happens when a device
link's supplier device is released during runtime PM suspend
operations and on device link removal.

To address this, introduce pm_runtime_release_supplier() to be used
in the above cases which will check the supplier device's runtime
PM usage counter in addition to the refcount_dec_not_one() return
value, so the loop can be terminated in case the rpm_active refcount
value becomes invalid, and update the code in question to use it as
appropriate.

This change is not expected to have any visible functional impact.

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-01-27 11:04:44 +01:00
..
2021-09-02 22:49:16 +02:00
2021-09-20 12:43:34 +01:00
2021-08-29 14:47:42 +03:00
2021-10-07 16:51:57 +02:00
2021-09-08 15:32:35 -07:00
2021-08-26 16:52:03 -07:00
2021-12-14 10:57:11 +01:00
2021-11-25 09:48:41 +01:00
2021-09-07 21:17:28 +02:00
2021-08-26 15:32:28 -04:00
2021-09-06 07:20:56 -04:00
2021-11-25 09:49:08 +01:00
2021-09-03 09:58:13 -07:00
2021-08-19 09:02:55 +09:00
2021-09-23 11:01:12 -04:00
2021-11-18 19:15:51 +01:00
2021-08-23 13:19:12 +02:00
2021-11-18 19:17:02 +01:00
2021-09-17 13:52:17 +01:00
2021-08-18 22:08:24 +02:00
2021-09-02 21:38:56 +02:00
2021-10-07 16:51:57 +02:00
2021-08-19 09:02:55 +09:00
2021-11-21 13:44:12 +01:00
2021-09-08 15:32:35 -07:00
2021-09-15 09:22:35 -06:00
2021-12-14 10:57:15 +01:00