From patchwork Sat Oct 22 07:19:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1090883wrr; Sat, 22 Oct 2022 00:48:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5I0lFYH7eTGpJkhS7hczHQauQjlwndDkg3UtoqoxOpDaKmKXMQIsH7uHawOZaGVNd3Nddq X-Received: by 2002:a63:e40e:0:b0:46e:acf4:628c with SMTP id a14-20020a63e40e000000b0046eacf4628cmr8898405pgi.159.1666424931002; Sat, 22 Oct 2022 00:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666424930; cv=none; d=google.com; s=arc-20160816; b=bT35O3XvYFjaO6DAWECmFx/7V/l86fZzM2j5bGu6ejuqFOJhnbWYUrfV8ILeDN+J36 S8pzlDQdUu5uMP2iqwdqN+fpem+vsaY5DX+vUEa5L5nrvnKFFUzT/smxiyCx3CZfZchc zBKOkWCD3yliQUq24X0Tu+XhNd7gwaUFZ2F+C0CmM7z3g4v7wcX2q7W/DN/0P78RXOvu AM+95v+SHQPPNYOFDQ5IrJ27slXU1GNZVm0a2x/wkRkCC1I4ZVf6K3IyTRmryebjWqCH A9AvjiplCfSayglJweLLdtef/JepB570CBHIdZIN1qpSG0aqb9Wnd0yuepMxHN1iBQI+ VA9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=fs0www+8PA7T57IXMJKXSnpp9C1s8zgnr8gK4cYj7iY=; b=i7hZveQ3G52xr8nDHHcKXs0jzvjiaei5+0IisTi6l/+4LpvobIKGaTqbOHCoUCEqO6 mUx26JHZ20jlub5se4bZp8sr7Y9wM8lQkxzXPR8sUQKNOHgSy6tCiNVkvFe8Va7pf2FM vv2tOuRhDzTY/LCuYi4rfc64cRZYcTzSIlOc6hNJU2Me2oGGNbFWcZC+wWKpwa96wkLT aGIpMrg4oc+aBHQ1JT9on/rI7XpEyqTneIhFyKtmKzFolnc/hZvxbgE8wjnOreinPNvn 8G8IUKcLOJLasu+HZcaoLvQSJ4pXjQpVeZIxvaNAziXof3xOyeRT3AecE8tcOQANO0Sg TYhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cq2lKnRv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 25-20020a630a19000000b0046e9bac6d84si8136141pgk.453.2022.10.22.00.48.38; Sat, 22 Oct 2022 00:48:50 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=cq2lKnRv; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231599AbiJVHsN (ORCPT + 99 others); Sat, 22 Oct 2022 03:48:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231579AbiJVHrq (ORCPT ); Sat, 22 Oct 2022 03:47:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2E11645F5; Sat, 22 Oct 2022 00:45:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8072460B1F; Sat, 22 Oct 2022 07:38:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90437C433D6; Sat, 22 Oct 2022 07:38:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424310; bh=ZizTAglFEXVj37CKMUyIA+z7OphHdSQB1tjv3W2T0vQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cq2lKnRvqHF7ZQBEfgizfMakPYBy3aw873pMpdlP2KZ94JWuWuCmrhlWs7Yv2nByy CR4VWitAMrORgHSg5xcw3fkxed5z0j9oIEGyFyVoRSSO5dElW8D/pxTQBkRdAbG8LC aiLy3UPaHPURfhCiLU2ieOoEeq+En1Iw3FJLuRh4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Emil Velikov , Dmitry Osipenko , Gerd Hoffmann Subject: [PATCH 5.19 068/717] drm/virtio: Unlock reservations on virtio_gpu_object_shmem_init() error Date: Sat, 22 Oct 2022 09:19:07 +0200 Message-Id: <20221022072427.171090730@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747373188737199930?= X-GMAIL-MSGID: =?utf-8?q?1747373188737199930?= From: Dmitry Osipenko commit fdf0ff4d12cbcd76b53f27c96ce51ddca400884a upstream. Unlock reservations in the error code path of virtio_gpu_object_create() to silence debug warning splat produced by ww_mutex_destroy(&obj->lock) when GEM is released with the held lock. Cc: stable@vger.kernel.org Fixes: 30172efbfb84 ("drm/virtio: blob prep: refactor getting pages and attaching backing") Reviewed-by: Emil Velikov Signed-off-by: Dmitry Osipenko Link: http://patchwork.freedesktop.org/patch/msgid/20220630200726.1884320-4-dmitry.osipenko@collabora.com Signed-off-by: Gerd Hoffmann Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/virtio/virtgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -248,6 +248,8 @@ int virtio_gpu_object_create(struct virt ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents); if (ret != 0) { + if (fence) + virtio_gpu_array_unlock_resv(objs); virtio_gpu_array_put_free(objs); virtio_gpu_free_object(&shmem_obj->base); return ret;