Blame 0514-hw-qxl-exit-on-failure-to-register-qxl-interface.patch
|
Hans de Goede |
64c339 |
From a0f199b76debf55933c2b3b917c13c86784e3be0 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
64c339 |
From: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
64c339 |
Date: Wed, 3 Oct 2012 20:13:58 +0200
|
|
Hans de Goede |
64c339 |
Subject: [PATCH 514/647] hw/qxl: exit on failure to register qxl interface
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
This prevents a segfault later on when the device reset handler
|
|
Hans de Goede |
64c339 |
tries to access a NULL ssd.worker since interface_attach_worker has
|
|
Hans de Goede |
64c339 |
not been called.
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
Signed-off-by: Alon Levy <alevy@redhat.com>
|
|
Hans de Goede |
64c339 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Hans de Goede |
64c339 |
---
|
|
Hans de Goede |
64c339 |
hw/qxl.c | 6 +++++-
|
|
Hans de Goede |
64c339 |
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
diff --git a/hw/qxl.c b/hw/qxl.c
|
|
Hans de Goede |
64c339 |
index 9389752..a2dd020 100644
|
|
Hans de Goede |
64c339 |
--- a/hw/qxl.c
|
|
Hans de Goede |
64c339 |
+++ b/hw/qxl.c
|
|
Hans de Goede |
64c339 |
@@ -2035,7 +2035,11 @@ static int qxl_init_common(PCIQXLDevice *qxl)
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
qxl->ssd.qxl.base.sif = &qxl_interface.base;
|
|
Hans de Goede |
64c339 |
qxl->ssd.qxl.id = qxl->id;
|
|
Hans de Goede |
64c339 |
- qemu_spice_add_interface(&qxl->ssd.qxl.base);
|
|
Hans de Goede |
64c339 |
+ if (qemu_spice_add_interface(&qxl->ssd.qxl.base) != 0) {
|
|
Hans de Goede |
64c339 |
+ error_report("qxl interface %d.%d not supported by spice-server\n",
|
|
Hans de Goede |
64c339 |
+ SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR);
|
|
Hans de Goede |
64c339 |
+ return -1;
|
|
Hans de Goede |
64c339 |
+ }
|
|
Hans de Goede |
64c339 |
qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl);
|
|
Hans de Goede |
64c339 |
|
|
Hans de Goede |
64c339 |
init_pipe_signaling(qxl);
|
|
Hans de Goede |
64c339 |
--
|
|
Hans de Goede |
64c339 |
1.7.12.1
|
|
Hans de Goede |
64c339 |
|