[PATCH v5 2/5] liveupdate: fix TOCTOU race in luo_session_retrieve()

Pratyush Yadav pratyush at kernel.org
Mon May 18 09:13:02 PDT 2026


On Mon, May 18 2026, Pasha Tatashin wrote:

> Extend the scope of the rwsem_read lock in luo_session_retrieve() to
> overlap with the acquisition of the session mutex. This prevents a
> concurrent thread from releasing and freeing the session between the
> lookup and the mutex lock.
>
> Fixes: 0153094d03df ("liveupdate: luo_session: add sessions support")
> Acked-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>

I was about to comment that perhaps we should drop session header lock
after getting session lock, but I think the session retrieval is pretty
fast so this should not matter.

So,

Reviewed-by: Pratyush Yadav (Google) <pratyush at kernel.org>

-- 
Regards,
Pratyush Yadav



More information about the kexec mailing list