]> git.proxmox.com Git - mirror_qemu.git/commit - hw/s390x/virtio-ccw.c
virtio-rng: Fix crash with non-default backend
authorCole Robinson <crobinso@redhat.com>
Fri, 31 May 2013 18:12:48 +0000 (14:12 -0400)
committerAnthony Liguori <aliguori@us.ibm.com>
Tue, 18 Jun 2013 15:05:45 +0000 (10:05 -0500)
commit5b456438f5bb395ed6b1eec95e18ce7a7a884a0a
tree80561e189665deaea65dc41a708f26aa26a40693
parentafd59989db90683fa127fec501d2633bcfbd6379
virtio-rng: Fix crash with non-default backend

'default_backend' isn't always set, but 'rng' is, so use that.

$ ./x86_64-softmmu/qemu-system-x86_64 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0
Segmentation fault (core dumped)

Regressed with virtio refactoring in 59ccd20a9ac719cff82180429458728f03ec612f

CC: qemu-stable@nongnu.org
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Message-id: bf4505014a0a941dbd3c62068f3cf2c496b69e6a.1370023944.git.crobinso@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/s390x/s390-virtio-bus.c
hw/s390x/virtio-ccw.c
hw/virtio/virtio-pci.c