From: Mario Limonciello <superm1@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
Linux PM <linux-pm@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Todd Brandt <todd.e.brandt@linux.intel.com>,
Linus Torvalds <torvalds@linuxfoundation.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Samuel Zhang <guoqing.zhang@amd.com>
Subject: Re: [PATCH v1] PM: hibernate: Restrict GFP mask in hibernation_snapshot()
Date: Wed, 10 Sep 2025 13:26:28 -0500 [thread overview]
Message-ID: <24abb0c2-553c-49a5-8daf-60d3726557df@kernel.org> (raw)
In-Reply-To: <5924662.DvuYhMxLoT@rafael.j.wysocki>
On 9/10/25 4:41 AM, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> Commit 12ffc3b1513e ("PM: Restrict swap use to later in the suspend
> sequence") incorrectly removed a pm_restrict_gfp_mask() call from
> hibernation_snapshot(), so memory allocations involving swap are not
> prevented from being carried out in this code path any more which may
> lead to serious breakage.
>
> The symptoms of such breakage have become visible after adding a
> shrink_shmem_memory() call to hibernation_snapshot() in commit
> 2640e819474f ("PM: hibernate: shrink shmem pages after dev_pm_ops.prepare()")
> which caused this problem to be much more likely to manifest itself.
>
> However, since commit 2640e819474f was initially present in the DRM
> tree that did not include commit 12ffc3b1513e, the symptoms of this
> issue were not visible until merge commit 260f6f4fda93 ("Merge tag
> 'drm-next-2025-07-30' of https://gitlab.freedesktop.org/drm/kernel")
> that exposed it through an entirely reasonable merge conflict
> resolution.
>
> Fixes: 12ffc3b1513e ("PM: Restrict swap use to later in the suspend sequence")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220555
> Reported-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> Tested-by: Todd Brandt <todd.e.brandt@linux.intel.com>
> Cc: 6.16+ <stable@vger.kernel.org> # 6.16+
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> This is super-urgent, so I'm going to fast-track it.
Thanks. Looking at the codepaths again it makes sense.
It's a bit surprising to me this showed up, we had done stress testing
before submitting. Nonetheless, thank you for the fix.
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
>
> ---
> kernel/power/hibernate.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/kernel/power/hibernate.c
> +++ b/kernel/power/hibernate.c
> @@ -449,6 +449,7 @@ int hibernation_snapshot(int platform_mo
> shrink_shmem_memory();
>
> console_suspend_all();
> + pm_restrict_gfp_mask();
>
> error = dpm_suspend(PMSG_FREEZE);
>
>
>
>
next prev parent reply other threads:[~2025-09-10 18:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 9:41 [PATCH v1] PM: hibernate: Restrict GFP mask in hibernation_snapshot() Rafael J. Wysocki
2025-09-10 18:26 ` Mario Limonciello [this message]
2025-10-25 5:08 ` [REGRESSION][BISECTED] Hibernation: WARNING at kernel/power/main.c:48 pm_restrict_gfp_mask (was: "[PATCH v1] PM: hibernate: Restrict GFP mask in hibernation_snapshot()") Askar Safin
2025-10-26 1:31 ` Mario Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=24abb0c2-553c-49a5-8daf-60d3726557df@kernel.org \
--to=superm1@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=guoqing.zhang@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=todd.e.brandt@linux.intel.com \
--cc=torvalds@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox