Re: [PATCH v4 03/11] liveupdate: Protect file handler list with rwsem
From: Mike Rapoport
Date: Wed Apr 15 2026 - 11:26:32 EST
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@xxxxxxxxxx>
> Reviewed-by: Pratyush Yadav (Google) <pratyush@xxxxxxxxxx>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
> ---
> 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.