2023-09-08 22:58:32

by Maximilian Heyne

[permalink] [raw]
Subject: Re: [PATCH v2] virtio-mmio: fix memory leak of vm_dev

On Thu, Sep 07, 2023 at 05:28:25PM +0100, Catalin Marinas wrote:
> On Thu, Sep 07, 2023 at 02:17:16PM +0000, Maximilian Heyne wrote:
> > With the recent removal of vm_dev from devres its memory is only freed
> > via the callback virtio_mmio_release_dev. However, this only takes
> > effect after device_add is called by register_virtio_device. Until then
> > it's an unmanaged resource and must be explicitly freed on error exit.
> >
> > This bug was discovered and resolved using Coverity Static Analysis
> > Security Testing (SAST) by Synopsys, Inc.
> >
> > Cc: <[email protected]>
> > Fixes: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev")
> > Signed-off-by: Maximilian Heyne <[email protected]>
>
> Reviewed-by: Catalin Marinas <[email protected]>
> Tested-by: Catalin Marinas <[email protected]>
>
> Thanks.
>
> --
> Catalin

Who would apply this patch? Something seems to have choked my patch so it didn't
reach lore.kernel.org (message couldn't be delivered due to timeout). Should I
try to send it again?



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879