Message ID | 20240418174955.947730-10-mjt@tls.msk.ru |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:adf:e6ca:0:b0:346:15ad:a2a with SMTP id y10csp695439wrm; Thu, 18 Apr 2024 10:52:52 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWeoRfkszqP5s6/GajheceWpKEcBh7Cxnav2TseE3YRYqlbTQeofSxnhhKwmEng+1Whu8vQYgQy7JQzPPN2lSlf X-Google-Smtp-Source: AGHT+IGWZbu0pt3P7/PTfTzMYY8jUIrteG639TPPSwZV/2EjVEDAcgJxSYzlLHdkYUKU1F8VBGFo X-Received: by 2002:a0c:cdc1:0:b0:69b:13b6:f30f with SMTP id a1-20020a0ccdc1000000b0069b13b6f30fmr3562306qvn.5.1713462772416; Thu, 18 Apr 2024 10:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1713462772; cv=none; d=google.com; s=arc-20160816; b=MMpuZU8HZxkAqn5RW6fJCQ3kJon6zGdXPsC6p0WkD4kJNI/tlLYOVQVDLbzpERwZ9q x4IF/nIxAVkhuy8Z4d0qdEDVuLhbCtrCdZGi3bece3NnVv+RxdNE6Db+/eCXTvRODYwd /Q4Xtc9VJP0z3tJVvjsQiDFd8nK7lP0RvF3YRIt/ZOaVSx2Webe/IobIiFyI6kXQ0OFd CiR8/Lxc+IXVXJsuGJU9bjopQ5Tp+1nZO63zXGUzHmdtC5Xzqf8yMGRcniBiNKDGiFdS MVP4um9TplyiEqgibTd8PqfgyoWlzCfkLA27ZU/4oPMQr6ALV6lop0Cu0lXGXnf9mCnT +8wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from; bh=nVCRx4LmQ5zTmc6Qu1X2v39tOQHaaQICF0k27nJKHhM=; fh=QVoUuY2eq7zHDUh6dz5HBMfw52FYv6i5lf23Bb6vyq0=; b=TMu9HW8Yqc/3wjze8p3WyrWKR2IcSbH7lhlRqfpXnkJziqIS6RKlxhgkomV4bewZNL fAZf97PPD+Rlut1pst2sNxheg2JTkTjkwJqwtxxr9oDNCwJsYIz5Apud9i/M2a5JnwTK 7tLawfat3asZoaNKhkzVJvcQKipnlGNeak037iPD9GU+PlmiM73J1Ok0ILZuyiA6O4lf Jbr0JVdLcRstOH7zrirj/Ru7ZOPzeQxUyCE1tTgHTkwfQbguEgp7WiOTkex++mgHxLV2 ogueoaLHuir6rOLHi0LDiIyg7llaJe34C4MtrMUZopsnfpO1ckOYDg3r+3imdYoMqRdQ Qd9Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id jr15-20020a0562142a8f00b0069948077219si1925411qvb.597.2024.04.18.10.52.52 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 18 Apr 2024 10:52:52 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1rxVu5-00007n-S9; Thu, 18 Apr 2024 13:50:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mjt@tls.msk.ru>) id 1rxVtt-0008Hu-GW; Thu, 18 Apr 2024 13:50:23 -0400 Received: from isrv.corpit.ru ([86.62.121.231]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <mjt@tls.msk.ru>) id 1rxVtr-0007YK-E3; Thu, 18 Apr 2024 13:50:21 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id ED6B95FD6A; Thu, 18 Apr 2024 20:50:01 +0300 (MSK) Received: from tls.msk.ru (mjt.wg.tls.msk.ru [192.168.177.130]) by tsrv.corpit.ru (Postfix) with SMTP id 422BEB9340; Thu, 18 Apr 2024 20:49:59 +0300 (MSK) Received: (nullmailer pid 947833 invoked by uid 1000); Thu, 18 Apr 2024 17:49:55 -0000 From: Michael Tokarev <mjt@tls.msk.ru> To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>, Alexander Bulekov <alxndr@bu.edu>, Yongkang Jia <kangel@zju.edu.cn>, Xiao Lei <nop.leixiao@gmail.com>, Yiming Tao <taoym@zju.edu.cn>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S . Tsirkin" <mst@redhat.com>, Michael Tokarev <mjt@tls.msk.ru> Subject: [Stable-8.2.3 097/116] hw/display/virtio-gpu: Protect from DMA re-entrancy bugs Date: Thu, 18 Apr 2024 20:49:27 +0300 Message-Id: <20240418174955.947730-10-mjt@tls.msk.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <qemu-stable-8.2.3-20240418204921@cover.tls.msk.ru> References: <qemu-stable-8.2.3-20240418204921@cover.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=86.62.121.231; envelope-from=mjt@tls.msk.ru; helo=isrv.corpit.ru X-Spam_score_int: -68 X-Spam_score: -6.9 X-Spam_bar: ------ X-Spam_report: (-6.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
None
|
expand
|
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index b016d3bac8..a7b16ba072 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -1463,10 +1463,8 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) g->ctrl_vq = virtio_get_queue(vdev, 0); g->cursor_vq = virtio_get_queue(vdev, 1); - g->ctrl_bh = qemu_bh_new_guarded(virtio_gpu_ctrl_bh, g, - &qdev->mem_reentrancy_guard); - g->cursor_bh = qemu_bh_new_guarded(virtio_gpu_cursor_bh, g, - &qdev->mem_reentrancy_guard); + g->ctrl_bh = virtio_bh_new_guarded(qdev, virtio_gpu_ctrl_bh, g); + g->cursor_bh = virtio_bh_new_guarded(qdev, virtio_gpu_cursor_bh, g); g->reset_bh = qemu_bh_new(virtio_gpu_reset_bh, g); qemu_cond_init(&g->reset_cond); QTAILQ_INIT(&g->reslist);