diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2011-07-19 06:19:18 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2011-07-19 06:28:34 -0400 |
commit | 75fd9edc1054a1fa1d1411adec368dadf68e764e (patch) | |
tree | d1a54e4bfb7a3d000c2a70465e54dc155bb6b475 /drivers/vhost/vhost.c | |
parent | 2723feaa8ec64f677f644c9189ed87d83f5559c1 (diff) |
vhost: fix zcopy reference counting
Fix get/put refcount imbalance with zero copy,
which caused qemu to hang forever on guest driver unload.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'drivers/vhost/vhost.c')
-rw-r--r-- | drivers/vhost/vhost.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 46822c0d9f7f..c16d22545868 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c | |||
@@ -1578,7 +1578,6 @@ struct vhost_ubuf_ref *vhost_ubuf_alloc(struct vhost_virtqueue *vq, | |||
1578 | if (!ubufs) | 1578 | if (!ubufs) |
1579 | return ERR_PTR(-ENOMEM); | 1579 | return ERR_PTR(-ENOMEM); |
1580 | kref_init(&ubufs->kref); | 1580 | kref_init(&ubufs->kref); |
1581 | kref_get(&ubufs->kref); | ||
1582 | init_waitqueue_head(&ubufs->wait); | 1581 | init_waitqueue_head(&ubufs->wait); |
1583 | ubufs->vq = vq; | 1582 | ubufs->vq = vq; |
1584 | return ubufs; | 1583 | return ubufs; |