projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge tag 'kernel.sys.v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner...
[linux-2.6-microblaze.git]
/
drivers
/
virtio
/
virtio_vdpa.c
diff --git
a/drivers/virtio/virtio_vdpa.c
b/drivers/virtio/virtio_vdpa.c
index
e1a1411
..
72eaef2
100644
(file)
--- a/
drivers/virtio/virtio_vdpa.c
+++ b/
drivers/virtio/virtio_vdpa.c
@@
-151,6
+151,9
@@
virtio_vdpa_setup_vq(struct virtio_device *vdev, unsigned int index,
if (!name)
return NULL;
+ if (index >= vdpa->nvqs)
+ return ERR_PTR(-ENOENT);
+
/* Queue shouldn't already be set up. */
if (ops->get_vq_ready(vdpa, index))
return ERR_PTR(-ENOENT);