Re: [PATCH v4 03/11] liveupdate: Protect file handler list with rwsem

Mike Rapoport
2026-04-15T15:25:22Z

On Mon, Apr 13, 2026 at 06:51:19PM +0000, Pasha Tatashin wrote:
> Because liveupdate file handlers will no longer hold a module reference
> when registered, we must ensure that the access to the handler list is
> protected against concurrent module unloading.
>
> Utilize the global luo_register_rwlock to protect the global registry of
> file handlers. Read locks are taken during list traversals in
> luo_preserve_file() and luo_file_deserialize(). Write locks are taken
> during registration and unregistration.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
> Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>

> ---
> kernel/liveupdate/luo_core.c | 6 ++++++
> kernel/liveupdate/luo_file.c | 31 +++++++++++++++++++++++--------
> kernel/liveupdate/luo_internal.h | 2 ++
> 3 files changed, 31 insertions(+), 8 deletions(-)
>

--
Sincerely yours,
Mike.