diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-26 13:34:38 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-03-26 13:34:38 -0500 |
| commit | fad5593ca646010d3cb83f7926d78dd30c20c610 (patch) | |
| tree | 33803bfc0b0e85396b6e626222dfff0b1390de49 | |
| parent | 0fbf01fe911e84c588be41636570f46f597113d6 (diff) | |
| parent | b57ed9bf075e33cdd2f9eb545ff555301dd57221 (diff) | |
| download | focaccia-qemu-fad5593ca646010d3cb83f7926d78dd30c20c610.tar.gz focaccia-qemu-fad5593ca646010d3cb83f7926d78dd30c20c610.zip | |
Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
# By Cornelia Huck # Via Cornelia Huck * cohuck/virtio-ccw-upstr: virtio-ccw: Queue sanity check for notify hypercall.
| -rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index d4364143ea..76b63e2ca6 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -31,6 +31,9 @@ static int virtio_ccw_hcall_notify(const uint64_t *args) if (!sch || !css_subch_visible(sch)) { return -EINVAL; } + if (queue >= VIRTIO_PCI_QUEUE_MAX) { + return -EINVAL; + } virtio_queue_notify(virtio_ccw_get_vdev(sch), queue); return 0; |