]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
liveupdate: Use refcount_t for FLB reference counts
authorDavid Matlack <dmatlack@google.com>
Thu, 23 Apr 2026 17:40:28 +0000 (17:40 +0000)
committerMike Rapoport (Microsoft) <rppt@kernel.org>
Sun, 31 May 2026 23:31:38 +0000 (02:31 +0300)
commitd2850ff2f8c5acda4c1097aa53c006a75b091f2c
tree0da4afc74df3ab3683ce7973a6484f6c7259de44
parenta1f8ed3451ff64f6907fbbd6eb5ca4dff1e2a503
liveupdate: Use refcount_t for FLB reference counts

Use refcount_t instead of a raw integer to keep track of references on
incoming and outgoing FLBs. Using refcount_t provides protection from
overflow, underflow, and other issues.

Fixes: cab056f2aae7 ("liveupdate: luo_flb: introduce File-Lifecycle-Bound global state")
Signed-off-by: David Matlack <dmatlack@google.com>
Reviewed-by: Samiullah Khawaja <skhawaja@google.com>
Reviewed-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Link: https://lore.kernel.org/r/20260423174032.3140399-2-dmatlack@google.com
Signed-off-by: Pasha Tatashin <pasha.tatashin@soleen.com>
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
include/linux/liveupdate.h
kernel/liveupdate/luo_flb.c