From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Maximilian Heyne <mheyne@amazon.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
virtualization@lists.linux-foundation.org,
stable@vger.kernel.org, Xuan Zhuo <xuanzhuo@linux.alibaba.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] virtio-mmio: fix memory leak of vm_dev
Date: Wed, 13 Sep 2023 22:47:50 +0200 [thread overview]
Message-ID: <ZQIf9uwjnk7DQUf3@shikoro> (raw)
In-Reply-To: <20230911090328.40538-1-mheyne@amazon.de>
[-- Attachment #1: Type: text/plain, Size: 949 bytes --]
On Mon, Sep 11, 2023 at 09:03:29AM +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: <stable@vger.kernel.org>
> Fixes: 55c91fedd03d ("virtio-mmio: don't break lifecycle of vm_dev")
> Signed-off-by: Maximilian Heyne <mheyne@amazon.de>
> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
> Tested-by: Catalin Marinas <catalin.marinas@arm.com>
> Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Sorry for overlooking this in 55c91fedd03d and thanks for fixing it!
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2023-09-13 20:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 9:03 [PATCH v3] virtio-mmio: fix memory leak of vm_dev Maximilian Heyne
2023-09-13 20:47 ` Wolfram Sang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZQIf9uwjnk7DQUf3@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=catalin.marinas@arm.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mheyne@amazon.de \
--cc=mst@redhat.com \
--cc=stable@vger.kernel.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=xuanzhuo@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox