* [Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend
@ 2013-05-30 14:47 Cole Robinson
2013-05-30 18:00 ` Frederic Konrad
0 siblings, 1 reply; 2+ messages in thread
From: Cole Robinson @ 2013-05-30 14:47 UTC (permalink / raw)
To: qemu-devel; +Cc: amit.shah, Cole Robinson, fred.konrad, qemu-stable, mst
'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>
---
hw/virtio/virtio-pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
index 444b71a..b070b64 100644
--- a/hw/virtio/virtio-pci.c
+++ b/hw/virtio/virtio-pci.c
@@ -1455,7 +1455,7 @@ static int virtio_rng_pci_init(VirtIOPCIProxy *vpci_dev)
}
object_property_set_link(OBJECT(vrng),
- OBJECT(vrng->vdev.conf.default_backend), "rng",
+ OBJECT(vrng->vdev.conf.rng), "rng",
NULL);
return 0;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend
2013-05-30 14:47 [Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend Cole Robinson
@ 2013-05-30 18:00 ` Frederic Konrad
0 siblings, 0 replies; 2+ messages in thread
From: Frederic Konrad @ 2013-05-30 18:00 UTC (permalink / raw)
To: Cole Robinson; +Cc: amit.shah, mst, qemu-devel, qemu-stable
Hi,
On 30/05/2013 16:47, Cole Robinson wrote:
> '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
Sorry for that :/,
Can you do the same fix for:
- s390 (hw/s390x/s390-virtio-bus.c:303)
- ccw (hw/s390x/virtio-ccw.c:747)
Thanks,
Fred
> CC: qemu-stable@nongnu.org
> Signed-off-by: Cole Robinson <crobinso@redhat.com>
> ---
> hw/virtio/virtio-pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c
> index 444b71a..b070b64 100644
> --- a/hw/virtio/virtio-pci.c
> +++ b/hw/virtio/virtio-pci.c
> @@ -1455,7 +1455,7 @@ static int virtio_rng_pci_init(VirtIOPCIProxy *vpci_dev)
> }
>
> object_property_set_link(OBJECT(vrng),
> - OBJECT(vrng->vdev.conf.default_backend), "rng",
> + OBJECT(vrng->vdev.conf.rng), "rng",
> NULL);
>
> return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-30 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 14:47 [Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend Cole Robinson
2013-05-30 18:00 ` Frederic Konrad
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.