On 9/17/25 12:32, Akihiko Odaki wrote:
Based-on: <[email protected]>
("[PATCH v3 0/7] Do not unparent in instance_finalize()")

This patch series was spun off from "[PATCH v2 00/15] Fix memory region
leaks and use-after-finalization":
https://lore.kernel.org/qemu-devel/[email protected]/

When developing the next version of "[PATCH 00/16] memory: Stop
piggybacking on memory region owners*", I faced multiple memory region
leaks and use-after-finalization. This series extracts their fixes so
that the number of Cc: won't explode.

Patch "qdev: Automatically delete memory subregions" and the succeeding
patches are for refactoring, but patch "vfio-user: Do not delete the
subregion" does fix use-after-finalization.

* 
https://lore.kernel.org/qemu-devel/[email protected]/

Signed-off-by: Akihiko Odaki <[email protected]>

This makes sense, but I think it is not bisectable, because of this in memory_region_del_subregion():

    assert(subregion->container == mr);
    subregion->container = NULL;

You would need to add a temporary

    if (subregion->container == NULL) {
        return;
    }

and undo it at the end of the series. Do you agree? With this change I can apply it.

Paolo


Reply via email to