OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e769bdc
)
virtio-ccw: Queue sanity check for notify hypercall.
author
Cornelia Huck
<cornelia.huck@de.ibm.com>
Tue, 26 Mar 2013 16:32:44 +0000
(17:32 +0100)
committer
Cornelia Huck
<cornelia.huck@de.ibm.com>
Tue, 26 Mar 2013 17:04:24 +0000
(18:04 +0100)
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>
hw/s390x/s390-virtio-ccw.c
patch
|
blob
|
history
diff --git
a/hw/s390x/s390-virtio-ccw.c
b/hw/s390x/s390-virtio-ccw.c
index
d436414
..
76b63e2
100644
(file)
--- 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;