Skip to contentSkip to conversation

vhost: fix zcopy reference counting

RFC PATCH New Michael S. Tsirkin 1 participant 1 message Jul 19, 2011

Subsystems (4)
lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

RFC PATCH 1/1 vhost: fix zcopy reference counting

Fix get/put refcount imbalance with zero copy, which caused qemu to hang forever on guest driver unload.

---

Dave, I've put this on my tree so no need for you to bother.

 drivers/vhost/vhost.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/vhost/vhost.c +0 -1
index 46822c0..c16d225 100644
@@ -1578,7 +1578,6 @@ struct vhost_ubuf_ref *vhost_ubuf_alloc(struct vhost_virtqueue *vq,
 	if (!ubufs)
 		return ERR_PTR(-ENOMEM);
 	kref_init(&ubufs->kref);
-	kref_get(&ubufs->kref);
 	init_waitqueue_head(&ubufs->wait);
 	ubufs->vq = vq;
 	return ubufs;
Signature · 1 line
1.7.5.53.gc233e