Skip to contentSkip to conversation

virtio: fix error handling for debug builds

PATCH New Michael S. Tsirkin 1 participant 1 message Aug 3, 2016 virtio core

lore
Share & tools
lore

Michael S. Tsirkin

author maintainer
#0 lore raw

PATCH 1/1 virtio: fix error handling for debug builds

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.

---
 drivers/virtio/virtio_ring.c | 1 +
 1 file changed, 1 insertion(+)
drivers/virtio/virtio_ring.c +1 -0
index 5ed228d..e383ecd 100644
@@ -428,6 +428,7 @@ unmap_release:
 	if (indirect)
 		kfree(desc);
 
+	END_USE(vq);
 	return -EIO;
 }
 
Signature · 1 line
MST