From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35507 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Phk68-0007IW-B1 for qemu-devel@nongnu.org; Tue, 25 Jan 2011 09:42:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Phk66-0002D5-Qg for qemu-devel@nongnu.org; Tue, 25 Jan 2011 09:42:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18290) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Phk66-0002Cy-Jv for qemu-devel@nongnu.org; Tue, 25 Jan 2011 09:42:18 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0PEgG6i023103 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Jan 2011 09:42:17 -0500 Received: from playa.tlv.redhat.com (dhcp-3-210.tlv.redhat.com [10.35.3.210]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0PEgFfK021965 for ; Tue, 25 Jan 2011 09:42:15 -0500 From: Alon Levy Date: Tue, 25 Jan 2011 16:42:14 +0200 Message-Id: <1295966534-13121-1-git-send-email-alevy@redhat.com> Subject: [Qemu-devel] [PATCH] hw/qxl: another missing unlock List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org We need to unlock the mutex before waiting on read via the worker call since the worker will try to lock and hang otherwise. Signed-off-by: Alon Levy --- hw/qxl.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/hw/qxl.c b/hw/qxl.c index 117f7c8..00c31c7 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -791,7 +791,9 @@ static void qxl_add_memslot(PCIQXLDevice *d, uint32_t slot_id, uint64_t delta) __FUNCTION__, memslot.slot_id, memslot.virt_start, memslot.virt_end); + qxl_unlock_iothread(&d->ssd); d->ssd.worker->add_memslot(d->ssd.worker, &memslot); + qxl_lock_iothread(&d->ssd); d->guest_slots[slot_id].ptr = (void*)memslot.virt_start; d->guest_slots[slot_id].size = memslot.virt_end - memslot.virt_start; d->guest_slots[slot_id].delta = delta; -- 1.7.3.5