qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] fix two virtio queues memleak
@ 2020-03-27  9:56 Pan Nengyuan
  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
  0 siblings, 2 replies; 5+ messages in thread
From: Pan Nengyuan @ 2020-03-27  9:56 UTC (permalink / raw)
  To: qemu-devel; +Cc: euler.robot, Pan Nengyuan, zhang.zhanghailiang, mst

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-03-28  0:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  9:56 [PATCH v3 0/2] fix two virtio queues memleak Pan Nengyuan
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

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).