From nobody Mon Feb 9 23:01:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529377573656584.8127229957931; Mon, 18 Jun 2018 20:06:13 -0700 (PDT) Received: from localhost ([::1]:38893 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV6yB-0006c0-Vl for importer@patchew.org; Mon, 18 Jun 2018 23:06:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5jD-0002lX-T7 for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5jD-0000S6-0r for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:46:39 -0400 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:34776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5jC-0000Rx-Ru; Mon, 18 Jun 2018 21:46:38 -0400 Received: by mail-oi0-x22b.google.com with SMTP id i205-v6so16713617oib.1; Mon, 18 Jun 2018 18:46:38 -0700 (PDT) Received: from localhost ([2600:1700:70:e488:b0ee:9bda:ee6f:91be]) by smtp.gmail.com with ESMTPSA id 3-v6sm6733328oin.12.2018.06.18.18.46.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:46:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iZ8qvO+ZthfWmT8UtU4hUZ4/ij2J03vCuiusrDC9TS0=; b=HUYUjhPR6AROHbsOmnc8xbNNs4R9yFO9P973Xw0dvLVPuTmilay2y11+vKSWMJ8kh1 bzmH/IE6cxU0uvbmhZ0WhMBc+SCj8QG/LetaEtTTGizDFURS2HRPflilxSA29vDHZvHD 5sBPJyuR4g0RkFIK721dWuETdzDvk4j5+jg6gAspLiOPwm8ljFDMOE2mVceQtYMsDbLp wtwJje8mG9aZ4bvQeIMpTsCXMviCROsb9WnZrLlvSz+lBqVTnt3H3oAPTJsM2cXKgqAN YZ9d+4qAcbzEYwEaevxkguix4sTjKtSXSREqpJU8wGtIbrRyNrVRWrQ7LJkf75957RJ5 KR3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=iZ8qvO+ZthfWmT8UtU4hUZ4/ij2J03vCuiusrDC9TS0=; b=rOsjTMjfuY6egdfRXtjXGloZEIbTtjvixXC17T3WhkdjCLE0+TEyFVSQNT3a7MP1rQ U3FsDl0AloookEPz3aWTTX2sR8P5rr887tdcos6qOa3ihuzptYdk5z+1ir3RXxy1yNEI ziu5wOrctyOL265dK8CBj5nVnvfJW6euJfdhHmGav83uZlpwrqvQNbH3xuiF/1rU+RP0 jG86la1T4fOx0QZYxhhVMrdNfqLS27IB40AhlSYhmOfuPZMLmGmUxIYWcjSPgeNis1GJ 6fc+u3/u2GixLMZQKW2zt313ikFdqJ9WarII+XK9rvxefb4nq3jMOuDwkfascJQrQ8Ml p2gA== X-Gm-Message-State: APt69E3o+kwnZlWUMHU7se8B25kxphJxOev8m3bIpgOtiWrw5PBW9O18 tfoSpssqgsKiwyJUkGwcmoEo5k4Z/rY= X-Google-Smtp-Source: ADUXVKLsji5KLAKfveu8ZP9CeAMdlOrRQTwwsn9Dr98eVRhU0q/w2bJtuCq+wp+hGCfaH31p/P7RVQ== X-Received: by 2002:aca:e60d:: with SMTP id d13-v6mr7888141oih.114.1529372797590; Mon, 18 Jun 2018 18:46:37 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:42:34 -0500 Message-Id: <20180619014319.28272-69-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c06::22b Subject: [Qemu-devel] [PATCH 068/113] qxl: fix local renderer crash X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-stable@nongnu.org, Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Gerd Hoffmann Make sure we only ask the spice local renderer for display updates in case we have a valid primary surface. Without that spice is confused and throws errors in case a display update request (triggered by screendump for example) happens in parallel to a mode switch and hits the race window where the old primary surface is gone and the new isn't establisted yet. Cc: qemu-stable@nongnu.org Fixes: https://bugzilla.redhat.com//show_bug.cgi?id=3D1567733 Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20180427115528.345-1-kraxel@redhat.com (cherry picked from commit 5bd5c27c7d284d01477c5cc022ce22438c46bf9f) Signed-off-by: Michael Roth --- hw/display/qxl-render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index 90e0865618..9c1c44481f 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -169,7 +169,8 @@ void qxl_render_update(PCIQXLDevice *qxl) =20 qemu_mutex_lock(&qxl->ssd.lock); =20 - if (!runstate_is_running() || !qxl->guest_primary.commands) { + if (!runstate_is_running() || !qxl->guest_primary.commands || + qxl->mode =3D=3D QXL_MODE_UNDEFINED) { qxl_render_update_area_unlocked(qxl); qemu_mutex_unlock(&qxl->ssd.lock); return; --=20 2.11.0