All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/3] virtio: detach VirtQueueElements freed by reset
@ 2016-09-19 13:28 Stefan Hajnoczi
  2016-09-19 13:28 ` [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element() Stefan Hajnoczi
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Stefan Hajnoczi @ 2016-09-19 13:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, lprosek, Stefan Hajnoczi

virtio-blk and virtio-serial need to free VirtQueueElements during device
reset.  Simply calling g_free(elem) is not enough because the scatter-gather
list should be unmapped and vq->inuse must be decremented.

These patches address the issue.  I am not including a patch that changes
vq->inuse = 0 to assert(!vq->inuse) in virtio_reset() yet because virtio-9p,
virtio-gpu, and virtio-net have code paths that do not decrement vq->inuse.

Stefan Hajnoczi (3):
  virtio: add virtio_detach_element()
  virtio-blk: add missing virtio_detach_element() call
  virtio-serial: add missing virtio_detach_element() call

 hw/block/virtio-blk.c       |  1 +
 hw/char/virtio-serial-bus.c | 14 ++++++++++++++
 hw/virtio/virtio.c          | 27 +++++++++++++++++++++++++--
 include/hw/virtio/virtio.h  |  2 ++
 4 files changed, 42 insertions(+), 2 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-10-05 13:12 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 13:28 [Qemu-devel] [PATCH 0/3] virtio: detach VirtQueueElements freed by reset Stefan Hajnoczi
2016-09-19 13:28 ` [Qemu-devel] [PATCH 1/3] virtio: add virtio_detach_element() Stefan Hajnoczi
2016-09-26  8:43   ` Greg Kurz
2016-09-27  7:32   ` Ladi Prosek
2016-09-27 10:08     ` Stefan Hajnoczi
2016-09-27 12:12       ` Ladi Prosek
2016-09-27 15:03         ` Stefan Hajnoczi
2016-09-27 15:24           ` Ladi Prosek
2016-09-19 13:28 ` [Qemu-devel] [PATCH 2/3] virtio-blk: add missing virtio_detach_element() call Stefan Hajnoczi
2016-09-27  7:49   ` Ladi Prosek
2016-09-27  8:07     ` Greg Kurz
2016-09-19 13:28 ` [Qemu-devel] [PATCH 3/3] virtio-serial: " Stefan Hajnoczi
2016-09-30 10:08   ` Ladi Prosek
2016-09-27 10:08 ` [Qemu-devel] [PATCH 0/3] virtio: detach VirtQueueElements freed by reset Stefan Hajnoczi
2016-10-05 13:12   ` Greg Kurz

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.