Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp316466iog; Wed, 29 Jun 2022 00:17:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sXS/eJ2/z/qwKV0ZkXVWt/lg/w0/W1NiTaRDNZAFkQw57Kyn49BiZkNzbPcqfnpTQ9BT+f X-Received: by 2002:a17:902:e5d1:b0:16a:3611:1811 with SMTP id u17-20020a170902e5d100b0016a36111811mr7953894plf.101.1656487055084; Wed, 29 Jun 2022 00:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656487055; cv=none; d=google.com; s=arc-20160816; b=x5sm3umvUfiYfcMv8dq52LVlwf9Z+mAk0ApxCns5MGGHgzraL9hNY+QmqA4JX9OCSR wyBm8PBeXN+qY1/E+b/niKfXUUl+Zgt2C5tfMrVXL0CEbTV4URirMhrVS6AsOt6jd/Gk T7o6J1gRVwbqb56EwNU78msunGr8ENRd6dgosFoSNSHTPbyyHIFh6HqJ3NHNydBhnPwg 54TL+NcoZoGSM6dKmaszL0EGBvSDL5N3GKSj9Q9rZus3yeoY9swBd275QijxZJjCzt3m OfSouZ5wbD8BxK0QJ4qhRdhQj9bLZ6x1doI39ip8UTzlqVknrYTb64HhFei0MCo07eOV ph8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=129AIVS+bR874oAduePNkhrz1Ah/5nb7SWXK+MVWBA4=; b=EHr4LLJl7uE7YjBpuzVyZjgwvfQruoVWWz2010MB9Tx+mt13/C4xqUYpXk8LMK9ty5 IhcwU9D9DIhu8G6UX7fIbXXpSXzrzikj8bAq7SBCyxQJKOqHL5CwC799/LLcOMV/Ll6r TDZUAQUfyCkCMn7fMtSpjUhZ+TJ4bz6Cb7oNeTZPTGOao7FKJqAUU5GNsSeKkfm/OjlR 2UdTAdsJs6+2rOWibANm+0Ps8pA4zlFyp8bmBaUNIkZuqYwn6OB43GB1wj3aTccB07fq rHcT1aCYh3YVy971Iwbc7U3v/IeNsLa5NDKQxhpWQstpd8+ZmOtUv1Z1bzMSGAg/Vi4T Ee0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=DVzFW+KJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w16-20020a1709026f1000b001586fbb2b6dsi13769646plk.566.2022.06.29.00.17.22; Wed, 29 Jun 2022 00:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=DVzFW+KJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231690AbiF2Gny (ORCPT + 99 others); Wed, 29 Jun 2022 02:43:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231694AbiF2Gnx (ORCPT ); Wed, 29 Jun 2022 02:43:53 -0400 Received: from ste-pvt-msa1.bahnhof.se (ste-pvt-msa1.bahnhof.se [213.80.101.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2798E2C65F; Tue, 28 Jun 2022 23:43:52 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 8D3F940CDE; Wed, 29 Jun 2022 08:43:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Score: -2.11 X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Authentication-Results: ste-pvt-msa1.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (ste-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9zVOpFpqurBe; Wed, 29 Jun 2022 08:43:49 +0200 (CEST) Received: by ste-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id E77D240CD6; Wed, 29 Jun 2022 08:43:48 +0200 (CEST) Received: from [192.168.0.209] (h-155-4-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 828A9360677; Wed, 29 Jun 2022 08:43:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1656485028; bh=lhOYNGqGisf/E17sgFrN5FIY96Ihx7G/tMj3K5gKxzw=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=DVzFW+KJOPDbhjAKm9CdyTI6VMdeTr0f9r1dPaIWy8TRfcE8pBAwRUNbgXu1Aq9X1 erEdsBm3Wj/SnXDmI7gS7vo2eW2qpK2lNzlxt8GkPEpfs1zIWUKHVE5z74qTdZHYis 3s7ooaxnN+paDWie6SRxEe77bEmvdZI0xGv/hSFU= Message-ID: <6f2b0b7a-0031-dfe2-8ce2-191b940064b0@shipmail.org> Date: Wed, 29 Jun 2022 08:43:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v6 08/22] drm/virtio: Unlock reservations on dma_resv_reserve_fences() error Content-Language: en-US To: Dmitry Osipenko , David Airlie , Gerd Hoffmann , Gurchetan Singh , Chia-I Wu , Daniel Vetter , Daniel Almeida , Gert Wollny , Gustavo Padovan , Daniel Stone , Tomeu Vizoso , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Steven Price , Alyssa Rosenzweig , Rob Clark , Emil Velikov , Robin Murphy , Qiang Yu , Sumit Semwal , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , Thierry Reding , Tomasz Figa , Marek Szyprowski , Mauro Carvalho Chehab , Alex Deucher , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, linux-tegra@vger.kernel.org, Dmitry Osipenko , kernel@collabora.com, linux-media@vger.kernel.org References: <20220526235040.678984-1-dmitry.osipenko@collabora.com> <20220526235040.678984-9-dmitry.osipenko@collabora.com> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= In-Reply-To: <20220526235040.678984-9-dmitry.osipenko@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/27/22 01:50, Dmitry Osipenko wrote: > Unlock reservations on dma_resv_reserve_fences() error to fix recursive > locking of the reservations when this error happens. Fixes: > Cc: stable@vger.kernel.org With that fixed, Reviewed-by: Thomas Hellström > Signed-off-by: Dmitry Osipenko > --- > drivers/gpu/drm/virtio/virtgpu_gem.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c > index 580a78809836..7db48d17ee3a 100644 > --- a/drivers/gpu/drm/virtio/virtgpu_gem.c > +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c > @@ -228,8 +228,10 @@ int virtio_gpu_array_lock_resv(struct virtio_gpu_object_array *objs) > > for (i = 0; i < objs->nents; ++i) { > ret = dma_resv_reserve_fences(objs->objs[i]->resv, 1); > - if (ret) > + if (ret) { > + virtio_gpu_array_unlock_resv(objs); > return ret; > + } > } > return ret; > }