Re: [PATCH v3 2/2] liveupdate: initialize incoming FLB state before finish

From: Andrew Morton

Date: Thu Apr 02 2026 - 14:17:41 EST


On Thu, 02 Apr 2026 13:28:33 +0000 Pratyush Yadav <pratyush@xxxxxxxxxx> wrote:

> The state of an incoming FLB object is initialized when it is first
> used. The initialization is done via luo_flb_retrieve_one(), which looks
> at all the incoming FLBs, matches the FLB to its serialized entry, and
> initializes the incoming data and count.
>
> luo_flb_file_finish_one() is called when finish is called for a file
> registered with this FLB. If no file handler has used the FLB by this
> point, the count stays un-initialized at 0. luo_flb_file_finish_one()
> then decrements this un-initialized count, leading to an underflow. This
> results in the FLB finish never being called since the count has
> underflowed to a very large value.
>
> Fix this by making sure the FLB is retrieved before using its count.

I like that the above tells people what the actual bug is!

I still have both Leo's patches in mm.git, in wait-and-see mode. What
to do here? Should I upstream [1/2] and drop [2/2]? Drop both and
revisit after -rc1?

Also, did we consider cc:stable for these two? Perhaps add the
cc:stable if we decide to attend to this after -rc1?