qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-stable] [PATCH] virtio-rng: Fix crash with non-default backend


From: Frederic Konrad
Subject: Re: [Qemu-stable] [PATCH] virtio-rng: Fix crash with non-default backend
Date: Thu, 30 May 2013 20:00:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

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: address@hidden
Signed-off-by: Cole Robinson <address@hidden>
---
  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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]