From patchwork Tue Jan 25 14:42:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alon Levy X-Patchwork-Id: 80371 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 62017B7136 for ; Wed, 26 Jan 2011 02:07:36 +1100 (EST) Received: from localhost ([127.0.0.1]:41469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhkUK-0001mO-LI for incoming@patchwork.ozlabs.org; Tue, 25 Jan 2011 10:07:20 -0500 Received: from [140.186.70.92] (port=48650 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhkJD-0005n3-Vb for qemu-devel@nongnu.org; Tue, 25 Jan 2011 09:55:53 -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 To: qemu-devel@nongnu.org Date: Tue, 25 Jan 2011 16:42:14 +0200 Message-Id: <1295966534-13121-1-git-send-email-alevy@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH] hw/qxl: another missing unlock X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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;