Re: [PATCH 2/2] liveupdate: Reference count incoming FLB data
From: Pasha Tatashin
Date: Thu Apr 23 2026 - 14:21:46 EST
On 04-23 17:40, David Matlack wrote:
> Increment the incoming FLB refcount in liveupdate_flb_get_incoming() so
> that the FLB structure cannot be freed while the caller is actively using
> it. Add an additional liveupdate_flb_put_incoming() function so the
> caller can explicitly indicate when it is done using the FLB data.
>
> During a Live Update, a subsystem might need to hold onto the incoming
> File-Lifecycle-Bound (FLB) data for an extended period, such as during
> device enumeration. Incrementing the reference count guarantees that the
> data remains valid and accessible until the subsystem releases it,
> preventing future use-after-free bugs.
>
> Fixes: cab056f2aae7 ("liveupdate: luo_flb: introduce File-Lifecycle-Bound global state")
> Signed-off-by: David Matlack <dmatlack@xxxxxxxxxx>
Reviewed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Thanks!
Pasha