Received: from eggs.gnu.org ([140.186.70.92]:50750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0aL6-0003a9-Tk for qemu-devel@nongnu.org; Mon, 05 Sep 2011 10:39:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0aL1-0001h7-FW for qemu-devel@nongnu.org; Mon, 05 Sep 2011 10:39:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0aL1-0001gm-88 for qemu-devel@nongnu.org; Mon, 05 Sep 2011 10:39:51 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p85Edn7o017687 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 5 Sep 2011 10:39:49 -0400 From: Yonit Halperin Date: Mon, 5 Sep 2011 17:39:50 +0300 Message-Id: <1315233590-11142-1-git-send-email-yhalperi@redhat.com> Subject: [Qemu-devel] [PATCH] spice: set qxl->ssd.running=true before telling spice to start, RHBZ #733993 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Yonit Halperin , kraxel@redhat.com If qxl->ssd.running=true is set after telling spice to start, the spice server thread can call qxl_send_events while qxl->ssd.running is still false. This leads to assert(d->ssd.running). Signed-off-by: Yonit Halperin --- Since it looks like the purpose of the assert in qxl_send_event is preventing changes in the guest when the vm is stopped, I think it is not necessary for ssd.running to be exactly synchronized with the spice server status, but just be true before the spice worker starts. ui/spice-display.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ui/spice-display.c b/ui/spice-display.c index 683d454..3224f99 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -260,11 +260,12 @@ void qemu_spice_vm_change_state_handler(void *opaque, int running, int reason) SimpleSpiceDisplay *ssd = opaque; if (running) { + ssd->running = true; qemu_spice_start(ssd); } else { qemu_spice_stop(ssd); + ssd->running = false; } - ssd->running = running; } void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd, DisplayState *ds) -- 1.7.4.4