On Mon, 11 May 2026 at 14:28, Vineet Agarwal
<[email protected]> wrote:
>
> sysbus_mmio_map_name() passes MemoryRegion.name directly to
> strcmp() without checking whether the name is NULL.
>
> Commit e27194e087 ("virtio-gpu-virgl: correct parent for blob
> memory region") intentionally introduced a MemoryRegion with a
> NULL name, so sysbus_mmio_map_name() should not assume names are
> always present.
>
> Add a simple NULL check before calling strcmp().
>
> Signed-off-by: Vineet Agarwal <[email protected]>

I guess so, but MemoryRegions with a NULL name seem
like a bad idea.

e27194e087 looks like it is trying to work around some
other issue. I think we should revert that and fix the
actual problem, not do an extremely non-obvious thing with
NULL name pointers that happens to avoid a refcount problem.

thanks
-- PMM

Reply via email to