mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	sourabhjain@linux.ibm.com, jbouron@amazon.com,
	akpm@linux-foundation.org, error27@gmail.com, bhe@redhat.com,
	linux-kernel@vger.kernel.org, rafael.j.wysocki@intel.com,
	piliu@redhat.com, kexec@lists.infradead.org, skhawaja@google.com,
	graf@amazon.com, mario.limonciello@amd.com
Subject: Re: [PATCH v6 3/5] liveupdate: block session mutations during reboot
Date: Thu, 28 May 2026 17:51:47 +0300	[thread overview]
Message-ID: <ahhWgyYC-OJwBYgq@kernel.org> (raw)
In-Reply-To: <2vxzv7c739a2.fsf@kernel.org>

On Thu, May 28, 2026 at 04:20:53PM +0200, Pratyush Yadav wrote:
> On Wed, May 27 2026, Pasha Tatashin wrote:
> 
> > During the reboot() syscall, user processes may still be running
> > concurrently and attempting to mutate sessions (e.g., creating,
> > retrieving, or releasing sessions). To prevent this, introduce
> > luo_session_serialize_rwsem to synchronize mutations with the
> > serialization process.
> >
> > All session mutation operations (create, retrieve, release, ioctl) take
> > the read lock. The serialization process (luo_session_serialize) takes
> > the write lock and holds it indefinitely on success. This effectively
> > freezes the LUO session subsystem during the transition to the new
> > kernel. If serialization fails, the lock is released to allow recovery.
> >
> > Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support")
> > Reported-by: Oskar Gerlicz Kowalczuk <oskar@gerlicz.space>
> > Acked-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
> > Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> > ---
> >  kernel/liveupdate/luo_session.c | 56 +++++++++++++++++++++++++++++++--
> >  1 file changed, 53 insertions(+), 3 deletions(-)
> >  
> > +/*
> > + * Protects session mutations during serialization. All session mutation
> > + * operations must hold the read lock. The serialization process holds the write
> > + * lock indefinitely on success to block all concurrent and future mutations.
> > + */
> 
> Nit: this comment is redundant now. I guess you can remove this when
> applying.

Done :)
 
> Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
> 
> > +static DECLARE_RWSEM(luo_session_serialize_rwsem);
> > +
> >  /**
> >   * struct luo_session_header - Header struct for managing LUO sessions.
> >   * @count:      The number of sessions currently tracked in the @list.
> [...]
> 
> -- 
> Regards,
> Pratyush Yadav

-- 
Sincerely yours,
Mike.

  reply	other threads:[~2026-05-28 14:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27 20:27 [PATCH v6 0/5] liveupdate: serialization safety and race fixes Pasha Tatashin
2026-05-27 20:27 ` [PATCH v6 1/5] liveupdate: skip serialization for context-preserving kexec Pasha Tatashin
2026-05-27 20:27 ` [PATCH v6 2/5] liveupdate: fix TOCTOU race in luo_session_retrieve() Pasha Tatashin
2026-05-27 20:27 ` [PATCH v6 3/5] liveupdate: block session mutations during reboot Pasha Tatashin
2026-05-28 14:20   ` Pratyush Yadav
2026-05-28 14:51     ` Mike Rapoport [this message]
2026-05-27 20:27 ` [PATCH v6 4/5] liveupdate: fix u-a-f in luo_file_unpreserve_files() and luo_file_finish() Pasha Tatashin
2026-05-27 20:27 ` [PATCH v6 5/5] liveupdate: Remove unused ser field from struct luo_session Pasha Tatashin
2026-05-28 15:08 ` [PATCH v6 0/5] liveupdate: serialization safety and race fixes Mike Rapoport

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=ahhWgyYC-OJwBYgq@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=error27@gmail.com \
    --cc=graf@amazon.com \
    --cc=jbouron@amazon.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=piliu@redhat.com \
    --cc=pratyush@kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=skhawaja@google.com \
    --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

all inboxes | Powered by JetHome®