From: Pratyush Yadav <pratyush@kernel.org>
To: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: rppt@kernel.org, sourabhjain@linux.ibm.com, jbouron@amazon.com,
akpm@linux-foundation.org, bhe@redhat.com,
linux-kernel@vger.kernel.org, dan.carpenter@linaro.org,
liaoyuanhong@vivo.com, rafael.j.wysocki@intel.com,
piliu@redhat.com, kexec@lists.infradead.org,
pratyush@kernel.org, graf@amazon.com,
mario.limonciello@amd.com
Subject: Re: [PATCH v1 3/3] liveupdate: pin sessions and handle inactive ones during serialization
Date: Wed, 06 May 2026 10:53:34 +0200 [thread overview]
Message-ID: <2vxztsskzzox.fsf@kernel.org> (raw)
In-Reply-To: <20260506043200.2025677-8-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Wed, 6 May 2026 00:32:04 -0400")
On Wed, May 06 2026, Pasha Tatashin wrote:
> During the reboot() syscall, user processes are still running
> concurrently. Even though the system is actively serializing LUO
> sessions and will not return to userspace unless liveupdate_reboot()
> fails, it is still possible for a user process to close a preserved LUO
> session. This creates a race condition where a session could be
> destroyed while it is being serialized.
>
> To fix this, we must ensure that we only preserve sessions that are not
> closed at the time of serialization. Take a reference to the session's
> struct file for all outgoing sessions to pin them during this process.
>
> Handle inactive sessions (where get_file_active() fails) by cleaning
> them up and removing them from the outgoing list during the pinning
> phase. This ensures serialization can safely proceed with the remaining
> active sessions.
>
> Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support")
> Reported-by: Oskar Gerlicz Kowalczuk <oskar@gerlicz.space>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Same here. If we hold the session header and session locks, we don't
have to worry about all these corner cases. It is too late to touch the
session once liveupdate_reboot() starts, and if you try you just get put
to sleep.
[...]
--
Regards,
Pratyush Yadav
prev parent reply other threads:[~2026-05-06 8:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 4:32 [PATCH v1 0/3] liveupdate: serialization safety and race fixes Pasha Tatashin
2026-05-06 4:32 ` [PATCH v1 1/3] liveupdate: skip serialization for context-preserving kexec Pasha Tatashin
2026-05-06 8:31 ` Pratyush Yadav
2026-05-06 15:12 ` Pasha Tatashin
2026-05-06 15:33 ` Pratyush Yadav
2026-05-06 16:06 ` Pasha Tatashin
2026-05-06 4:32 ` [PATCH v1 2/3] liveupdate: block outgoing session mutations during serialization Pasha Tatashin
2026-05-06 8:47 ` Pratyush Yadav
2026-05-06 15:25 ` Pasha Tatashin
2026-05-06 4:32 ` [PATCH v1 3/3] liveupdate: pin sessions and handle inactive ones " Pasha Tatashin
2026-05-06 8:53 ` Pratyush Yadav [this message]
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=2vxztsskzzox.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=dan.carpenter@linaro.org \
--cc=graf@amazon.com \
--cc=jbouron@amazon.com \
--cc=kexec@lists.infradead.org \
--cc=liaoyuanhong@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=pasha.tatashin@soleen.com \
--cc=piliu@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rppt@kernel.org \
--cc=sourabhjain@linux.ibm.com \
/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