summaryrefslogtreecommitdiff
path: root/scripts/atomic/kerneldoc/inc_and_test
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-07-14 19:45:31 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-07-15 14:55:11 +0200
commitebd6884167eac94bae9f92793fcd84069d9e4415 (patch)
treee169dea607f3c4dfd40c708b4bce5827e3d31dec /scripts/atomic/kerneldoc/inc_and_test
parent228b9deded0011482149cdb474e3ad15aeeb4a97 (diff)
PM: sleep: Update power.completion for all devices on errors
After commit aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children"), the following scenario is possible: 1. Device A is async and it depends on device B that is sync. 2. Async suspend is scheduled for A before the processing of B is started. 3. A is waiting for B. 4. In the meantime, an unrelated device fails to suspend and returns an error. 5. The processing of B doesn't start at all and its power.completion is not updated. 6. A is still waiting for B when async_synchronize_full() is called. 7. Deadlock ensues. To prevent this from happening, update power.completion for all devices on errors in all suspend phases, but do not do it directly for devices that are already being processed or are waiting for the processing to start because in those cases it may be necessary to wait for the processing to actually complete before updating power.completion for the device. Fixes: aa7a9275ab81 ("PM: sleep: Suspend async parents after suspending children") Fixes: 443046d1ad66 ("PM: sleep: Make suspend of devices more asynchronous") Closes: https://lore.kernel.org/linux-pm/e13740a0-88f3-4a6f-920f-15805071a7d6@linaro.org/ Reported-and-tested-by: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://patch.msgid.link/6191258.lOV4Wx5bFT@rjwysocki.net
Diffstat (limited to 'scripts/atomic/kerneldoc/inc_and_test')
0 files changed, 0 insertions, 0 deletions