From: Mike Rapoport <rppt@kernel.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH 1/2] liveupdate: luo_file: do not clear serialized_data on unfreeze
Date: Wed, 28 Jan 2026 13:19:26 +0200 [thread overview]
Message-ID: <aXnwvkuTBL1NLt7f@kernel.org> (raw)
In-Reply-To: <20260126230302.2936817-2-pratyush@kernel.org>
On Tue, Jan 27, 2026 at 12:02:52AM +0100, Pratyush Yadav wrote:
> From: "Pratyush Yadav (Google)" <pratyush@kernel.org>
>
> The unfreeze operation is supposed to undo the effects of the freeze
> operation. serialized_data is not set by freeze, but by preserve.
> Consequently, the unpreserve operation needs to access serialized_data
> to undo the effects of the preserve operation. This includes freeing
> the serialized data structures for example.
>
> If a freeze callback fails, unfreeze is called for all frozen files.
> This would clear serialized_data for them. Since live update has failed,
> it can be expected that userspace aborts, releasing all sessions. When
> the sessions are released, unpreserve will be called for all files. The
> unfrozen files will see 0 in their serialized_data. This is not expected
> by file handlers, and they might either fail, leaking data and state, or
> might even crash or cause invalid memory access.
>
> Do not clear serialized_data on unfreeze so it gets passed on to
> unpreserve. There is no need to clear it on unpreserve since luo_file
> will be freed immediately after.
>
> Fixes: 7c722a7f44e0 ("liveupdate: luo_file: implement file systems callbacks")
> Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> ---
> kernel/liveupdate/luo_file.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/kernel/liveupdate/luo_file.c b/kernel/liveupdate/luo_file.c
> index a32a777f6df8..9f7283379ebc 100644
> --- a/kernel/liveupdate/luo_file.c
> +++ b/kernel/liveupdate/luo_file.c
> @@ -402,8 +402,6 @@ static void luo_file_unfreeze_one(struct luo_file_set *file_set,
>
> luo_file->fh->ops->unfreeze(&args);
> }
> -
> - luo_file->serialized_data = 0;
> }
>
> static void __luo_file_unfreeze(struct luo_file_set *file_set,
> --
> 2.52.0.457.g6b5491de43-goog
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-01-28 11:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 23:02 [PATCH 0/2] liveupdate: fixes in error handling Pratyush Yadav
2026-01-26 23:02 ` [PATCH 1/2] liveupdate: luo_file: do not clear serialized_data on unfreeze Pratyush Yadav
2026-01-28 11:19 ` Mike Rapoport [this message]
2026-01-30 18:56 ` Pratyush Yadav
2026-01-30 19:50 ` Andrew Morton
2026-02-02 11:14 ` Pratyush Yadav
2026-01-26 23:02 ` [PATCH 2/2] liveupdate: luo_file: remember retrieve() status Pratyush Yadav
2026-01-28 11:37 ` Mike Rapoport
2026-02-10 13:30 ` Pratyush Yadav
2026-01-31 15:31 ` Pasha Tatashin
2026-02-10 13:31 ` Pratyush Yadav
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=aXnwvkuTBL1NLt7f@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@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