Re: [PATCH 0/2] liveupdate: Small FLB fixes

From: Pratyush Yadav

Date: Fri Jul 10 2026 - 06:03:39 EST


On Thu, Jul 09 2026, David Matlack wrote:

> On Thu, May 28, 2026 at 10:41 AM David Matlack <dmatlack@xxxxxxxxxx> wrote:
>>
>> This series has 2 small fixes to how FLBs are managed. First is to
>> increase the outgoing FLB refcount during liveupdate_flb_get_outgoing()
>> so it cannot be freed while the caller is using it, and to align with
>> the semantics of liveupdate_flb_get_incoming(). The second is to prevent
>> FLB retrieve() from being called multiple times if the first attempt
>> fails.
>>
>> Both of these changes are needed for the correctness of the PCI core
>> support for Live Update:
>>
>> https://lore.kernel.org/linux-pci/20260522202410.3104264-1-dmatlack@xxxxxxxxxx/
>
> I'm wondering if we still want this series. After discussions with
> Pratyush and Sami (some on-list, some off-list) the v7 of the PCI
> series (which I haven't sent yet) does not depend on these changes for
> correctness.
>
> Patch 1: PCI core no longer calls get_outgoing() outside the scope of
> file handler callbacks. So there is no need to increment the reference
> count. We could still keep this to make get_outgoing behave the same
> way as get_incoming for consisteny at the cost of some extra
> complexity to manage outgoing FLB refcoutn.

I'm neutral on this one. I'll leave it up to Pasha's preference.

>
> Patch 2: PCI core panics if retrieve fails (proceeding without the PCI
> FLB can lead to memory corruption due to ongoing DMA). So the behavior
> of LUO on retrieve() errors does not matter.

This patch is useful for sure. Sure, PCI might panic, but other FLB
users like HugeTLB won't. And this patch fixes a real problem for those
cases.

The patch applies cleanly on liveupdate/next. So Mike, would you mind
applying patch 2/2 now? We can wait for Pasha to chime in for 1/2.

>
> Should we drop this series?

--
Regards,
Pratyush Yadav