Skip to content

Commit

Permalink
virtio: fix error handling for debug builds
Browse files Browse the repository at this point in the history
On error, virtqueue_add calls START_USE but not
END_USE. Thankfully that's normally empty anyway,
but might not be when debugging. Fix it up.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
  • Loading branch information
mstsirkin committed Aug 9, 2016
1 parent 58625ed commit 3cc36f6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/virtio/virtio_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,7 @@ static inline int virtqueue_add(struct virtqueue *_vq,
if (indirect)
kfree(desc);

END_USE(vq);
return -EIO;
}

Expand Down

0 comments on commit 3cc36f6

Please sign in to comment.