Skip to content

Commit

Permalink
vhost: fix zcopy reference counting
Browse files Browse the repository at this point in the history
Fix get/put refcount imbalance with zero copy,
which caused qemu to hang forever on guest driver unload.

Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
mstsirkin committed Jul 19, 2011
1 parent 2723fea commit 75fd9ed
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/vhost/vhost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 75fd9ed

Please sign in to comment.