Skip to content

Commit ec3cae6

Browse files
committed
PM: sleep: Call pm_restore_gfp_mask() after dpm_resume()
Commit 12ffc3b ("PM: Restrict swap use to later in the suspend sequence") changed two pm_restore_gfp_mask() calls in enter_state() and hibernation_restore() into one pm_restore_gfp_mask() call in dpm_resume_end(), but it put that call before the dpm_resume() invocation which is too early (some swap-backing devices may not be ready at that point). Moreover, this code ordering change was not even mentioned in the changelog of the commit mentioned above. Address this by moving that call after the dpm_resume() one. Fixes: 12ffc3b ("PM: Restrict swap use to later in the suspend sequence") Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Link: https://patch.msgid.link/[email protected]
1 parent d7b8f8e commit ec3cae6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/power/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ void dpm_complete(pm_message_t state)
12361236
*/
12371237
void dpm_resume_end(pm_message_t state)
12381238
{
1239-
pm_restore_gfp_mask();
12401239
dpm_resume(state);
1240+
pm_restore_gfp_mask();
12411241
dpm_complete(state);
12421242
}
12431243
EXPORT_SYMBOL_GPL(dpm_resume_end);

0 commit comments

Comments
 (0)