mirror of https://github.com/xemu-project/xemu.git
virtio-ccw: Queue sanity check for notify hypercall.
Verify that the virtio-ccw notify hypercall passed a reasonable value for queue. Cc: qemu-stable@nongnu.org Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
parent
e769bdc26d
commit
b57ed9bf07
|
@ -31,6 +31,9 @@ static int virtio_ccw_hcall_notify(const uint64_t *args)
|
||||||
if (!sch || !css_subch_visible(sch)) {
|
if (!sch || !css_subch_visible(sch)) {
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
if (queue >= VIRTIO_PCI_QUEUE_MAX) {
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
virtio_queue_notify(virtio_ccw_get_vdev(sch), queue);
|
virtio_queue_notify(virtio_ccw_get_vdev(sch), queue);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue