public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Alberto Garcia <berto@igalia.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Brian Geffon <bgeffon@google.com>,
	linux-pm@vger.kernel.org, Alberto Garcia <berto@igalia.com>
Subject: [PATCH v2 0/2] PM: hibernate: Drain trailing zero pages on userspace restore
Date: Mon,  9 Mar 2026 18:39:40 +0100	[thread overview]
Message-ID: <cover.1773075892.git.berto@igalia.com> (raw)

Hi,

Here's v2 of the patch.

Changes from v1:

- The extra snapshot_write_next() call happens now at the beginning of
  snapshot_write_finalize(), but only when handle->cur is in the data
  page region.

- We return -ENODATA if snapshot_write_next() returns > 0 (indicating
  that the kernel was expecting another page).

- A second patch changes the userspace restore code to return -ENODATA
  when snapshot_image_loaded() fails.

Regards,

Berto

Alberto Garcia (2):
  PM: hibernate: Drain trailing zero pages on userspace restore
  PM: hibernate: return -ENODATA if the snapshot image is not loaded

 kernel/power/snapshot.c | 11 +++++++++++
 kernel/power/user.c     |  7 +++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

-- 
2.47.3


             reply	other threads:[~2026-03-09 17:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 17:39 Alberto Garcia [this message]
2026-03-09 17:39 ` [PATCH v2 1/2] PM: hibernate: Drain trailing zero pages on userspace restore Alberto Garcia
2026-03-09 17:44   ` Brian Geffon
2026-03-20 18:54     ` Rafael J. Wysocki
2026-03-09 17:39 ` [PATCH v2 2/2] PM: hibernate: return -ENODATA if the snapshot image is not loaded Alberto Garcia
2026-03-09 17:45   ` Brian Geffon
2026-03-20 19:00     ` Rafael J. Wysocki

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=cover.1773075892.git.berto@igalia.com \
    --to=berto@igalia.com \
    --cc=bgeffon@google.com \
    --cc=lenb@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.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