Skip to content

Commit 246ef76

Browse files
ideakrafaeljw
authored andcommitted
PM / Sleep: fix async suspend_late/freeze_late error handling
If an asynchronous suspend_late or freeze_late callback fails during the SUSPEND, FREEZE or QUIESCE phases, we don't propagate the corresponding error correctly, in effect ignoring the error and continuing the suspend-to-ram/hibernation. During suspend-to-ram this could leave some devices without a valid saved context, leading to a failure to reinitialize them during resume. During hibernation this could leave some devices active interfeering with the creation / restoration of the hibernation image. Also this could leave the corresponding devices without a valid saved context and failure to reinitialize them during resume. Fixes: de377b3 (PM / sleep: Asynchronous threads for suspend_late) Signed-off-by: Imre Deak <imre.deak@intel.com> Cc: 3.15+ <stable@vger.kernel.org> # 3.15+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent cac7f24 commit 246ef76

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/base/power/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,6 +1266,8 @@ int dpm_suspend_late(pm_message_t state)
12661266
}
12671267
mutex_unlock(&dpm_list_mtx);
12681268
async_synchronize_full();
1269+
if (!error)
1270+
error = async_error;
12691271
if (error) {
12701272
suspend_stats.failed_suspend_late++;
12711273
dpm_save_failed_step(SUSPEND_SUSPEND_LATE);

0 commit comments

Comments
 (0)