From nobody Sun Feb 8 09:32:34 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 1532377444284948.658834021364; Mon, 23 Jul 2018 13:24:04 -0700 (PDT) Received: from localhost ([::1]:36352 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhND-0005t9-3G for importer@patchew.org; Mon, 23 Jul 2018 16:24:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40523) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhhI2-0001Ha-NS for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:18:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhhI1-00027I-PD for qemu-devel@nongnu.org; Mon, 23 Jul 2018 16:18:42 -0400 Received: from mail-oi0-x235.google.com ([2607:f8b0:4003:c06::235]:34553) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhhI1-00026J-JY; Mon, 23 Jul 2018 16:18:41 -0400 Received: by mail-oi0-x235.google.com with SMTP id 13-v6so3496091ois.1; Mon, 23 Jul 2018 13:18:41 -0700 (PDT) Received: from localhost (76-251-165-188.lightspeed.austtx.sbcglobal.net. [76.251.165.188]) by smtp.gmail.com with ESMTPSA id 10-v6sm6885081oip.29.2018.07.23.13.18.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jul 2018 13:18:39 -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=kzcnaUng3vOHeyfZi/+yG0MMYvHtE1wxhzeRmjRDOz4=; b=U1vGbPBEamP/XUM/5V4EAc4zIVjxKM3kR3WN08uMzv1t6GtcuNsIwwqPsmZQpzSYyZ Lssfpm++/dAZlDRmFOqdE3PmzaAUUGADkGmtjNl9qNAvZI+l04QQW0NN9SYo0GL70TRp qmTaqVQf6VSesaranPh2rRohswqQQexOgm2ELhqWCaXC92tgrpw+sUytZnKnPhT8aVEy l3tLOu37ZUxLEcKuJYD/V/dvzKzGch9LfzvtzQ/GeZ/kxOjA5WhpaQTGY+PkdztMfvyq sl9pu1QNM+pIMDE0vdADsDwv1n8LMfYeCa2hkQN3Jd1iCTK3o7XCL2n/nDuTIn0+8MHE 4Liw== 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=kzcnaUng3vOHeyfZi/+yG0MMYvHtE1wxhzeRmjRDOz4=; b=fFJWK5RvvknwtodAozKvcMuiQc/eKKHZbZnCpQveovJP+RPznruNdui1Dxa6j3Xxew TSMVhCKXWOU8d5aE5HA2t+LCw3jWPzpaCSsHiMEEJyX58kZP4a9jcF++okgbZoo3QFuq BObGJmsCpPeXM/29Yd57HwGhkzpdZjIxPWehRwOlPUwo7i7z499Tk1rvUFxmNGw1IROQ Nd2hxYGXChj5rzUcm4MDg0Rar25/0o7m3ByaSS797e3CybsFavt+2r4/9dYkjoXuXl/r 4SJuBNB4s1tomye4zGZIkTb6vDAlKUpdIHmSwj0FJDtckYf8GH1m/Gh/FRpPwgc+IyRg 9bhg== X-Gm-Message-State: AOUpUlGlj7tgIkz3FeKD8jUdnG8cp9RTyK5m/r5/ig48RalYgqSyN8F4 FALyUX7y1x3mctogqU63m9oynjIHv+Y= X-Google-Smtp-Source: AAOMgpeKL9disj31bZ7zv5PFeal9h0WUFrip/kMWfjU3g5IjK+rMLWeMQAuPSqGX6qDNYynFv4cZ5A== X-Received: by 2002:aca:b208:: with SMTP id b8-v6mr305137oif.144.1532377120369; Mon, 23 Jul 2018 13:18:40 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 23 Jul 2018 15:16:19 -0500 Message-Id: <20180723201748.25573-11-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180723201748.25573-1-mdroth@linux.vnet.ibm.com> References: <20180723201748.25573-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::235 Subject: [Qemu-devel] [PATCH 10/99] 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 e7ac4f8789..c62b9a5e75 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.17.1