From: Pan Nengyuan <pannengyuan@huawei.com>
To: <qemu-devel@nongnu.org>
Cc: euler.robot@huawei.com, Pan Nengyuan <pannengyuan@huawei.com>,
zhang.zhanghailiang@huawei.com, mst@redhat.com
Subject: [PATCH v3 0/2] fix two virtio queues memleak
Date: Fri, 27 Mar 2020 17:56:40 +0800 [thread overview]
Message-ID: <20200327095642.18424-1-pannengyuan@huawei.com> (raw)
This series fix two vqs leak:
1. Do delete vqs on the error path in virtio_blk_device_realize().
2. Do delete vqs in virtio_iommu_device_unrealize() to fix another leaks.
v2->v1:
- Fix incorrect free in virtio_blk_device_realize, it will cause a uaf.
v3->v2:
- Aslo clean 's->as_by_busptr' hash table in virtio_iommu_device_unrealize.(Suggested by Stefano Garzarella)
Pan Nengyuan (2):
virtio-blk: delete vqs on the error path in realize()
virtio-iommu: delete vqs in unrealize to fix memleak
hw/block/virtio-blk.c | 3 +++
hw/virtio/virtio-iommu.c | 3 +++
2 files changed, 6 insertions(+)
--
2.18.2
next reply other threads:[~2020-03-27 9:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 9:56 Pan Nengyuan [this message]
2020-03-27 9:56 ` [PATCH v3 1/2] virtio-blk: delete vqs on the error path in realize() Pan Nengyuan
2020-03-27 9:56 ` [PATCH v3 2/2] virtio-iommu: delete vqs in unrealize to fix memleak Pan Nengyuan
2020-03-27 16:26 ` Stefano Garzarella
2020-03-28 0:31 ` Pan Nengyuan
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=20200327095642.18424-1-pannengyuan@huawei.com \
--to=pannengyuan@huawei.com \
--cc=euler.robot@huawei.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.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;
as well as URLs for NNTP newsgroup(s).