]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PM: sleep: Call pm_restore_gfp_mask() after dpm_resume()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Jul 2025 17:12:47 +0000 (19:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Jul 2025 20:53:06 +0000 (22:53 +0200)
commitec3cae639482a8da11a3ae30d28ceceb9d6a3f56
treeab5deebe271f74d6bfc192dbf519027ecdc48c71
parentd7b8f8e20813f0179d8ef519541a3527e7661d3a
PM: sleep: Call pm_restore_gfp_mask() after dpm_resume()

Commit 12ffc3b1513e ("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: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/2797018.mvXUDI8C0e@rjwysocki.net
drivers/base/power/main.c