[Qemu-devel] [PATCH v2] vhost: Fix use-after-free in vhost_log_put()

2017-06-30 Thread Jia-Shiun Li
In commit 9e0bc24f dev->log_size was reset to zero too early before syncing vhost log. It causes syncing to be skipped. Use local variable to keep its value before resetting. Signed-off-by: Jia-Shiun Li --- v1 -> v2: * Use local variable to keep value of dev->log_size. --- hw/virti

[Qemu-devel] [PATCH] vhost: Fix use-after-free in vhost_log_put()

2017-06-22 Thread Jia-Shiun Li
In commit 9e0bc24f dev->log_size was reset to zero too early before syncing vhost log. It causes syncing to be skipped. Move it to clear dev->log* after use. Signed-off-by: Jia-Shiun Li --- hw/virtio/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/