From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
qemu-devel@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by malloc() with free()
Date: Mon, 23 Mar 2020 09:41:14 -0400 [thread overview]
Message-ID: <20200323094104-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20200323112943.12010-1-philmd@redhat.com>
On Mon, Mar 23, 2020 at 12:29:40PM +0100, Philippe Mathieu-Daudé wrote:
> Coverity reported a ALLOC_FREE_MISMATCH in vg_handle_cursor(),
> because the memory returned by vu_queue_pop() is allocated with
> malloc(). Fix it.
>
> Similar error occurs with virtio. Document and fix.
I will queue this. Thanks!
> Philippe Mathieu-Daudé (3):
> vhost-user-gpu: Release memory returned by vu_queue_pop() with free()
> virtio: Document virtqueue_pop()
> virtio-gpu: Release memory returned by virtqueue_pop() with free()
>
> include/hw/virtio/virtio.h | 8 ++++++++
> contrib/vhost-user-gpu/vhost-user-gpu.c | 4 ++--
> contrib/vhost-user-gpu/virgl.c | 2 +-
> hw/display/virtio-gpu-3d.c | 2 +-
> hw/display/virtio-gpu.c | 8 ++++----
> 5 files changed, 16 insertions(+), 8 deletions(-)
>
> --
> 2.21.1
next prev parent reply other threads:[~2020-03-23 13:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-23 11:29 [PATCH-for-5.0 0/3] virtio,vhost-gpu: Release memory returned by malloc() with free() Philippe Mathieu-Daudé
2020-03-23 11:29 ` [PATCH-for-5.0 1/3] vhost-user-gpu: Release memory returned by vu_queue_pop() " Philippe Mathieu-Daudé
2020-03-23 11:54 ` Marc-André Lureau
2020-04-15 19:27 ` Peter Maydell
2020-03-23 11:29 ` [PATCH-for-5.0 2/3] virtio: Document virtqueue_pop() Philippe Mathieu-Daudé
2020-03-23 11:54 ` Marc-André Lureau
2020-03-25 17:50 ` Marc-André Lureau
2020-03-25 20:51 ` Philippe Mathieu-Daudé
2020-03-23 11:29 ` [PATCH-for-5.0 3/3] virtio-gpu: Release memory returned by virtqueue_pop() with free() Philippe Mathieu-Daudé
2020-03-25 14:31 ` Marc-André Lureau
2020-03-23 13:41 ` Michael S. Tsirkin [this message]
2020-04-13 10:59 ` [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by malloc() " Michael S. Tsirkin
2020-04-14 12:40 ` Philippe Mathieu-Daudé
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=20200323094104-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.