On Thu, 21 Aug 2025 at 15:28, Peter Xu <[email protected]> wrote:
> > On Thu, 21 Aug 2025 at 13:40, Peter Maydell <[email protected]> 
> > wrote:
> > > In memory_region_unref_subregion(), subregion->container is NULL.
> > >
> > > This is because in memory_region_del_subregion() we do:
> > >
> > >     subregion->container = NULL;
> > >
> > > and then after that we call
> > >     memory_region_unref_subregion(subregion);
> > > which dereferences subregion->container.
> > >
> > > Won't this always SEGV ?

> Peter, could you try the v3 version patch 8/9 instead?
>
> https://lore.kernel.org/all/[email protected]/
>
> I still prefer that one, and I hope that one doesn't have this issue.

That one fails like this:
qemu-system-arm: ../../system/memory.c:1799: memory_region_finalize:
Assertion `!mr->container' failed.

See the discussion on v2 (which was the same for this patch):
https://lore.kernel.org/all/cafeaca9ktsjwf1rabpm5nv9ufukqzzk6+qo4pef4+rtirni...@mail.gmail.com/

thanks
-- PMM

Reply via email to