Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f03b17d authored by Heinz Graalfs's avatar Heinz Graalfs Committed by Rusty Russell
Browse files

virtio_blk: verify if queue is broken after virtqueue_get_buf()



In case virtqueue_get_buf() returned with a NULL pointer verify if the
virtqueue is broken in order to leave while loop.

Signed-off-by: default avatarHeinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent b3b32c94
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -292,6 +292,8 @@ static void virtblk_done(struct virtqueue *vq)
				req_done = true;
			}
		}
		if (unlikely(virtqueue_is_broken(vq)))
			break;
	} while (!virtqueue_enable_cb(vq));
	/* In case queue is stopped waiting for more buffers. */
	if (req_done)