diff options
Diffstat (limited to 'drivers/virtio/virtio_ring.c')
-rw-r--r-- | drivers/virtio/virtio_ring.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index c2fa5c6..937a49d 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers/virtio/virtio_ring.c @@ -184,6 +184,11 @@ static void *vring_get_buf(struct virtqueue *_vq, unsigned int *len) START_USE(vq); + if (unlikely(vq->broken)) { + END_USE(vq); + return NULL; + } + if (!more_used(vq)) { pr_debug("No more buffers in queue\n"); END_USE(vq); |