Re: [PATCH v4 04/11] liveupdate: Protect FLB lists with luo_register_rwlock

From: Mike Rapoport

Date: Wed Apr 15 2026 - 11:30:40 EST


On Mon, Apr 13, 2026 at 06:51:20PM +0000, Pasha Tatashin wrote:
> Because liveupdate FLB objects will soon drop their persistent module
> references when registered, list traversals must be protected against
> concurrent module unloading.
>
> To provide this protection, utilize the global luo_register_rwlock.
> It protects the global registry of FLBs and the handler's specific
> list of FLB dependencies.
>
> Read locks are used during concurrent list traversals (e.g., during
> preservation and serialization). 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>

> ---
> include/linux/liveupdate.h | 1 +
> kernel/liveupdate/luo_flb.c | 14 ++++++++++++++
> 2 files changed, 15 insertions(+)

--
Sincerely yours,
Mike.