linux/kernel/power
Youngjun Park a8d51efb59 PM: sleep: Drop spurious WARN_ON() from pm_restore_gfp_mask()
Commit 35e4a69b20 ("PM: sleep: Allow pm_restrict_gfp_mask()
stacking") introduced refcount-based GFP mask management that warns
when pm_restore_gfp_mask() is called with saved_gfp_count == 0.

Some hibernation paths call pm_restore_gfp_mask() defensively where
the GFP mask may or may not be restricted depending on the execution
path. For example, the uswsusp interface invokes it in
SNAPSHOT_CREATE_IMAGE, SNAPSHOT_UNFREEZE, and snapshot_release().
Before the stacking change this was a silent no-op; it now triggers
a spurious WARNING.

Remove the WARN_ON() wrapper from the !saved_gfp_count check while
retaining the check itself, so that defensive calls remain harmless
without producing false warnings.

Fixes: 35e4a69b20 ("PM: sleep: Allow pm_restrict_gfp_mask() stacking")
Signed-off-by: Youngjun Park <youngjun.park@lge.com>
[ rjw: Subject tweak ]
Link: https://patch.msgid.link/20260322120528.750178-1-youngjun.park@lge.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2026-03-23 13:54:53 +01:00
..
Kconfig PM: QoS: Introduce a CPU system wakeup QoS limit 2025-11-25 19:01:29 +01:00
Makefile PM: EM: Add a skeleton code for netlink notification 2025-10-22 21:44:37 +02:00
autosleep.c PM: sleep: autosleep: don't include 'pm_wakeup.h' directly 2024-12-05 12:14:26 +01:00
console.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
em_netlink.c PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
em_netlink.h PM: EM: Implement em_notify_pd_created/updated() 2025-10-22 21:44:38 +02:00
em_netlink_autogen.c PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
em_netlink_autogen.h PM: EM: Add dump to get-perf-domains in the EM YNL spec 2026-01-09 21:44:46 +01:00
energy_model.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hibernate.c Merge branch 'pm-sleep' 2025-11-28 16:01:13 +01:00
main.c PM: sleep: Drop spurious WARN_ON() from pm_restore_gfp_mask() 2026-03-23 13:54:53 +01:00
power.h PM: sleep: Add support for wakeup during filesystem sync 2025-11-20 22:29:40 +01:00
poweroff.c tty: sysrq: switch sysrq handlers from int to u8 2023-07-25 19:21:03 +02:00
process.c Revert "PM: sleep: Make pm_wakeup_clear() call more clear" 2025-10-23 12:48:04 +02:00
qos.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
snapshot.c PM: hibernate: Drain trailing zero pages on userspace restore 2026-03-23 13:33:06 +01:00
suspend.c PM: sleep: Fix suspend_test() at the TEST_CORE level 2025-12-28 13:01:39 +01:00
suspend_test.c rtc: class: make rtc_class constant 2024-03-08 12:05:10 +01:00
swap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
user.c PM: sleep: Call pm_sleep_fs_sync() instead of ksys_sync_helper() 2025-11-20 22:29:40 +01:00
wakelock.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00