diff options
author | Heinz Graalfs <graalfs@linux.vnet.ibm.com> | 2013-10-29 09:40:11 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-10-29 11:28:16 +1030 |
commit | 53c18c990644174935ca93e50d7ebd05e04cb9ee (patch) | |
tree | c906d0be66a84112bca5d3dbc89cf3d0f24d2ac7 /tools/virtio | |
parent | 67975901183799af8e93ec60e322f9e2a1940b9b (diff) | |
download | op-kernel-dev-53c18c990644174935ca93e50d7ebd05e04cb9ee.zip op-kernel-dev-53c18c990644174935ca93e50d7ebd05e04cb9ee.tar.gz |
virtio_test: verify if virtqueue_kick() succeeded
Verify if a host kick succeeded by checking return value of virtqueue_kick().
Signed-off-by: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'tools/virtio')
-rw-r--r-- | tools/virtio/virtio_test.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 059cb72..bdb71a2 100644 --- a/tools/virtio/virtio_test.c +++ b/tools/virtio/virtio_test.c @@ -172,7 +172,8 @@ static void run_test(struct vdev_info *dev, struct vq_info *vq, GFP_ATOMIC); if (likely(r == 0)) { ++started; - virtqueue_kick(vq->vq); + if (unlikely(!virtqueue_kick(vq->vq)) + r = -1; } } else r = -1; |