Skip to content
Commit 87186475 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: Fix warning in pm_restrict_gfp_mask() during SNAPSHOT_S2RAM ioctl

A warning is printed by pm_restrict_gfp_mask() while the
SNAPSHOT_S2RAM ioctl is being executed after creating a hibernation
image, because pm_restrict_gfp_mask() has been called once already
before the image creation and suspend_devices_and_enter() calls it
once again.  This happens after commit 452aa699


(mm/pm: force GFP_NOIO during suspend/hibernation and resume).

To avoid this issue, move pm_restrict_gfp_mask() and
pm_restore_gfp_mask() from suspend_devices_and_enter() to its caller
in kernel/power/suspend.c.

Reported-by: default avatarAlexandre Felipe Muller de Souza <alexandrefm@mandriva.com.br>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Cc: stable@kernel.org
parent 54b33352
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment