qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCHv3] qxl: qxl_send_events: ignore if stopped (instead


From: Alon Levy
Subject: [Qemu-devel] [PATCHv3] qxl: qxl_send_events: ignore if stopped (instead of abort)
Date: Tue, 12 Jul 2011 16:55:30 +0300

This can happen if there is an interface_get_command issued when
the server has been stopped. easy to trigger - do stop/cont a few
times (three seem to be enough).

The "solution" of ignoring the request is bad, but better then aborting
and a real solution would probably be in spice to not call get_command
in the first place.
---
 hw/qxl.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/hw/qxl.c b/hw/qxl.c
index 8a9463e..0585f02 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1406,7 +1406,10 @@ static void qxl_send_events(PCIQXLDevice *d, uint32_t 
events)
     uint32_t old_pending;
     uint32_t le_events = cpu_to_le32(events);
 
-    assert(d->ssd.running);
+    if (!d->ssd.running) {
+        fprintf(stderr, "qxl: not sending interrupt %d while stopped\n", 
events);
+        return;
+    }
     old_pending = __sync_fetch_and_or(&d->ram->int_pending, le_events);
     if ((old_pending & le_events) == le_events) {
         return;
-- 
1.7.6




reply via email to

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