Received: from eggs.gnu.org ([140.186.70.92]:43847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Cil-0006NM-II for qemu-devel@nongnu.org; Wed, 07 Sep 2011 03:38:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Cik-0002CI-NW for qemu-devel@nongnu.org; Wed, 07 Sep 2011 03:38:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12207) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Cik-0002C7-FK for qemu-devel@nongnu.org; Wed, 07 Sep 2011 03:38:54 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p877cr4c005582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Sep 2011 03:38:53 -0400 From: Gerd Hoffmann Date: Wed, 7 Sep 2011 09:38:34 +0200 Message-Id: <1315381115-6171-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1315381115-6171-1-git-send-email-kraxel@redhat.com> References: <1315381115-6171-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 5/6] 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 , Gerd Hoffmann From: Yonit Halperin 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 Signed-off-by: Gerd Hoffmann --- 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 4983963..e385361 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.1