[PATCH v2 3/3] liveupdate: block outgoing session mutations

Pasha Tatashin pasha.tatashin at soleen.com
Mon May 11 06:44:08 PDT 2026


On 05-11 13:03, Pratyush Yadav wrote:
> On Wed, May 06 2026, Pasha Tatashin wrote:
> 
> > During the reboot() syscall, user processes may still be running
> > concurrently and attempting to mutate sessions (e.g., adding files or
> > closing sessions). To prevent this, hold the session header's rwsem and
> > each session's mutex indefinitely on successful serialization.
> >
> > If serialization succeeds, these locks will never be released as the
> > system transitions to the new kernel, effectively blocking any
> > concurrent task attempting to modify or release a session. If
> > liveupdate_reboot() fails, the locks are released in the error path,
> > allowing normal operation to resume.
> >
> > Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support")
> > Reported-by: Oskar Gerlicz Kowalczuk <oskar at gerlicz.space>
> > Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>
> 
> Reviewed-by: Pratyush Yadav (Google) <pratyush at kernel.org>

Sashiko also provided a good comment about this patch: We run over 
MAX_LOCK_DEPTH limit with this patch. I am going to refactor to not take 
every session lock simultaneously during serialization.

> 
> [...]
> 
> -- 
> Regards,
> Pratyush Yadav



More information about the kexec mailing list