summary refs log tree commit diff stats
path: root/arch_init.c
diff options
context:
space:
mode:
authorJason Wang <jasowang@redhat.com>2015-03-20 14:07:50 +0800
committerMichael S. Tsirkin <mst@redhat.com>2015-03-25 13:39:25 +0100
commit7e0e736ecdfeac6d3517513d3a702304e4f6cf59 (patch)
treea3afabb60e43593737ee49276d8019384da7b5aa /arch_init.c
parent7976a6d23151c780474bdac106f3cf1343a2d6ca (diff)
downloadfocaccia-qemu-7e0e736ecdfeac6d3517513d3a702304e4f6cf59.tar.gz
focaccia-qemu-7e0e736ecdfeac6d3517513d3a702304e4f6cf59.zip
virtio-net: validate backend queue numbers against bus limitation
We don't validate the backend queue numbers against bus limitation,
this will easily crash qemu if it exceeds the limitation which will
hit the abort() in virtio_del_queue(). An example is trying to
starting a virtio-net device with 256 queues. E.g:

./qemu-system-x86_64 -netdev tap,id=hn0,queues=256 -device
virtio-net-pci,netdev=hn0

Fixing this by doing the validation and fail early.

Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'arch_init.c')
0 files changed, 0 insertions, 0 deletions