[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 05/31] vhost: assert the log was cleaned up
From: |
marcandre . lureau |
Subject: |
[Qemu-devel] [PATCH v5 05/31] vhost: assert the log was cleaned up |
Date: |
Thu, 21 Jul 2016 12:57:24 +0400 |
From: Marc-André Lureau <address@hidden>
Make sure the log was released on cleanup, or it will leak (the
alternative is to call vhost_log_put() unconditionally, but it may hide
some dev state issues).
Signed-off-by: Marc-André Lureau <address@hidden>
---
hw/virtio/vhost.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index 9bac163..8a18f9b 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -1134,6 +1134,7 @@ void vhost_dev_cleanup(struct vhost_dev *hdev)
g_free(hdev->mem);
g_free(hdev->mem_sections);
hdev->vhost_ops->vhost_backend_cleanup(hdev);
+ assert(!hdev->log);
QLIST_REMOVE(hdev, entry);
}
--
2.9.0
- [Qemu-devel] [PATCH v5 00/31] vhost-user reconnect fixes, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 01/31] misc: indentation, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 02/31] vhost-user: minor simplification, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 03/31] vhost: don't assume opaque is a fd, use backend cleanup, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 04/31] vhost: make vhost_log_put() idempotent, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 05/31] vhost: assert the log was cleaned up,
marcandre . lureau <=
- [Qemu-devel] [PATCH v5 06/31] vhost: fix cleanup on not fully initialized device, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 07/31] vhost: make vhost_dev_cleanup() idempotent, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 08/31] vhost-net: always call vhost_dev_cleanup() on failure, marcandre . lureau, 2016/07/21
- [Qemu-devel] [PATCH v5 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), marcandre . lureau, 2016/07/21
- Re: [Qemu-devel] [v5, 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), Ilya Maximets, 2016/07/25
- Re: [Qemu-devel] [v5, 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), Marc-André Lureau, 2016/07/25
- Re: [Qemu-devel] [v5, 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), Ilya Maximets, 2016/07/25
- Re: [Qemu-devel] [v5, 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), Marc-André Lureau, 2016/07/25
- Re: [Qemu-devel] [v5, 09/31] vhost: fix calling vhost_dev_cleanup() after vhost_dev_init(), Ilya Maximets, 2016/07/25
[Qemu-devel] [PATCH v5 10/31] vhost: do not assert() on vhost_ops failure, marcandre . lureau, 2016/07/21