From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alon Levy <alevy@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 4/8] hw/qxl: exit on failure to register qxl interface
Date: Mon, 8 Oct 2012 12:49:47 +0200 [thread overview]
Message-ID: <1349693391-32704-5-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1349693391-32704-1-git-send-email-kraxel@redhat.com>
From: Alon Levy <alevy@redhat.com>
This prevents a segfault later on when the device reset handler
tries to access a NULL ssd.worker since interface_attach_worker has
not been called.
Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/qxl.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/hw/qxl.c b/hw/qxl.c
index eb7707c..e99ed55 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -2037,7 +2037,11 @@ static int qxl_init_common(PCIQXLDevice *qxl)
qxl->ssd.qxl.base.sif = &qxl_interface.base;
qxl->ssd.qxl.id = qxl->id;
- qemu_spice_add_interface(&qxl->ssd.qxl.base);
+ if (qemu_spice_add_interface(&qxl->ssd.qxl.base) != 0) {
+ error_report("qxl interface %d.%d not supported by spice-server\n",
+ SPICE_INTERFACE_QXL_MAJOR, SPICE_INTERFACE_QXL_MINOR);
+ return -1;
+ }
qemu_add_vm_change_state_handler(qxl_vm_change_state_handler, qxl);
init_pipe_signaling(qxl);
--
1.7.1
next prev parent reply other threads:[~2012-10-08 10:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-08 10:49 [Qemu-devel] [PULL 0/8] spice patch queue Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 1/8] qxl: always update displaysurface on resize Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 2/8] qxl/update_area_io: cleanup invalid parameters handling Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 3/8] qxl: fix range check for rev3 io commands Gerd Hoffmann
2012-10-08 10:49 ` Gerd Hoffmann [this message]
2012-10-08 10:49 ` [Qemu-devel] [PATCH 5/8] hw/qxl: fix condition for exiting guest_bug Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 6/8] hw/qxl: qxl_dirty_surfaces: use uintptr_t Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 7/8] spice: raise requirement to 0.12 Gerd Hoffmann
2012-10-08 10:49 ` [Qemu-devel] [PATCH 8/8] qxl: set default revision to 4 Gerd Hoffmann
2012-10-12 16:18 ` [Qemu-devel] [PULL 0/8] spice patch queue Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349693391-32704-5-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).