]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
liveupdate: protect FLB lists with luo_register_rwlock
authorPasha Tatashin <pasha.tatashin@soleen.com>
Fri, 27 Mar 2026 03:33:28 +0000 (03:33 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 18 Apr 2026 07:10:49 +0000 (00:10 -0700)
commit6b2b22f7c8cf1596490beaac96a989cbafdfea57
tree7ffee6e8f54d477a70db3e232cfd87614d1c8f6f
parent9e1e18584548e8ef8b37a2a7f5eb84b91e35a160
liveupdate: protect FLB lists with luo_register_rwlock

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.

Link: https://lore.kernel.org/20260327033335.696621-5-pasha.tatashin@soleen.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Reviewed-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Cc: David Matlack <dmatlack@google.com>
Cc: Mike Rapoport <rppt@kernel.org>
Cc: Samiullah Khawaja <skhawaja@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/liveupdate.h
kernel/liveupdate/luo_flb.c