[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/10] usb-redir: Fix crash on migration with no cli
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 01/10] usb-redir: Fix crash on migration with no client connected |
Date: |
Wed, 3 Apr 2013 11:43:31 +0200 |
From: Hans de Goede <address@hidden>
If no client is connected on the src side, then we won't receive a
parser during migrate, in this case usbredir_post_load() should be a nop,
rather then to try to derefefence the NULL dev->parser pointer.
Signed-off-by: Hans de Goede <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/usb/redirect.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index d02a7b9..cf66df1 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1973,6 +1973,10 @@ static int usbredir_post_load(void *priv, int version_id)
{
USBRedirDevice *dev = priv;
+ if (dev->parser == NULL) {
+ return 0;
+ }
+
switch (dev->device_info.speed) {
case usb_redir_speed_low:
dev->dev.speed = USB_SPEED_LOW;
--
1.7.9.7
- [Qemu-devel] [PULL 00/10] usb patch queue, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 04/10] xhci: remove leftover debug printf, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 06/10] xhci: zap unused name field, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 01/10] usb-redir: Fix crash on migration with no client connected,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 07/10] usb-hub: limit chain length, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 02/10] usb-redir: Add flow control support, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 08/10] usb-hub: report status changes only once, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 09/10] usb: update docs for bus name change, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 03/10] xhci: fix numintrs sanity checks, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 05/10] xhci: remove unimplemented printfs, Gerd Hoffmann, 2013/04/03
- [Qemu-devel] [PATCH 10/10] usb-tablet: Don't claim wakeup capability for USB-2 version, Gerd Hoffmann, 2013/04/03