All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	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, graf@amazon.com,
	 mario.limonciello@amd.com
Subject: Re: [PATCH v1 2/3] liveupdate: block outgoing session mutations during serialization
Date: Wed, 6 May 2026 11:25:43 -0400	[thread overview]
Message-ID: <aftaoEKcC_rpB6jm@google.com> (raw)
In-Reply-To: <2vxzy0hwzzym.fsf@kernel.org>

On 05-06 10:47, Pratyush Yadav wrote:
> On Wed, May 06 2026, Pasha Tatashin wrote:
> 
> > Introduce a 'rebooting' flag in the session header to ensure that once
> > serialization has started, no new outgoing session mutations (creations
> > or file preservations) can occur.
> 
> Would it be a better idea to hold the session header lock and locks of
> each session? This would prevent anyone else from getting access to any
> of the sessions, and we don't have to worry about all the weird cases
> when one might add a file to a serialized session or something similar.
> 
> Once liveupdate_reboot() returns success, there is no going back anyway
> so I don't think it matters much that some tasks will be left waiting.

Overall, we can do that. The only possible issue I can think of is that 
we might get some stupid warnings if the shutdown takes too long:

INFO: task ... blocked for more than ... seconds
followed by a call trace.

But that is unlikely, and it also means that userspace has been trying 
to mutate sessions when it should not have, so I think your approach is 
workable. Let me update the implementation.

Pasha


  reply	other threads:[~2026-05-06 15:26 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 [this message]
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

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=aftaoEKcC_rpB6jm@google.com \
    --to=pasha.tatashin@soleen.com \
    --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=piliu@redhat.com \
    --cc=pratyush@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.