Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4370980imw; Tue, 19 Jul 2022 05:31:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uJSkdWOJCXzA1dMXegvqqcy41Uqq3u8BCFtG7g6hQ7Bz9PMf28rxqiQaZG2fYZmsQIrNvf X-Received: by 2002:a05:6830:4126:b0:61c:9d98:a511 with SMTP id w38-20020a056830412600b0061c9d98a511mr5156645ott.378.1658233897026; Tue, 19 Jul 2022 05:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658233897; cv=none; d=google.com; s=arc-20160816; b=t5u7k8W/bDi9P6kWbZA251DShB8RQTjXTNo6w2XMQUluGdcsV/zpaX/6Vszr855qFP Jb1/MCiBJehA0Qw2HaDP4RbcaRVjlTqd1W7Pd2tw+2kAobM16B0/e12eKpfTIdgueBjz ACF35q0lPrblkg6tlSniYnQ3x8kYBL65c5+rtLmNKOsX6ZQJbOnU6Q9p9Tg1GOvqU0hv HDB3Em/cc4BnCZ8lvcwPDg/cd4jNna/qRWGkZiynUdTUqI5ZWr3QPkrvdP7uynKj6v/m Emsco2Talfxuq5fPZALnFLbBwMGd/UuxJAWJFPR58j1wWIXWtYQ5XCwSrfRpI0qNp72R Mf2g== 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=LyOUhM/a4IoPyFNpyP32an9C11YbbIqRgwO4cN1YG10=; b=FUG3IzYEmM3fOj/T81QdBc6tGvQWZjrm8qPSpk0n0rsroP4IUqoXnx/OdAAwh+9o3O 4MmzhKv6p/uhXO93S2+j+2W5Lh274jd1Od1E7VhtwcsuuVcp4ZKBk7dJHEjW5pHXoYTQ AY2CM5XEY9Wzv3n1Qsihsg2rTioPdZrFJo6ymnR155dKHj9XekGwzcuTC9iLwMD+VBjW OiBvU3OKtrEhOuO+bls0/oh9/M2xDRM6G9bOsUnoShwzRMgmhNgwBePkalXD/GFoWD7q fDNlr+Jtsw9Qe8OuGB664zANHo8UhAWYAPjTAkapQEMEBmscbhPTn6NPRK8HLVkZJ5jP lHQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WgchxtNJ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c11-20020a056808138b00b00339e2fc1725si13072158oiw.157.2022.07.19.05.31.23; Tue, 19 Jul 2022 05:31:37 -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=WgchxtNJ; 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 S239329AbiGSMS4 (ORCPT + 99 others); Tue, 19 Jul 2022 08:18:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239086AbiGSMRb (ORCPT ); Tue, 19 Jul 2022 08:17:31 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C8B8564EC; Tue, 19 Jul 2022 05:06:34 -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 ams.source.kernel.org (Postfix) with ESMTPS id 007A7B81A8F; Tue, 19 Jul 2022 12:06:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606D7C341CA; Tue, 19 Jul 2022 12:06:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232374; bh=UuXp9ScCxXV7pCnMZ/CiD185HnQCTfcQfkHUVFyHhJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WgchxtNJL8HyYaMZDY71pZPNAou08VPb912Mn5oOgZ3WmSamIl03UiJNJ9gD7+SdG aG06boQ6oIncnh2pUfR3bO0Yob6d/kgAtKyMjEzpQLW3kYtXvWCNEoL6joSjGBRU+p 7+9XVKFaMCCAZiWXYomSSDOySEKq0GYHuRcOL730= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steven Price , Dmitry Osipenko Subject: [PATCH 5.10 018/112] drm/panfrost: Put mapping instead of shmem obj on panfrost_mmu_map_fault_addr() error Date: Tue, 19 Jul 2022 13:53:11 +0200 Message-Id: <20220719114627.750832934@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114626.156073229@linuxfoundation.org> References: <20220719114626.156073229@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.8 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 From: Dmitry Osipenko commit fb6e0637ab7ebd8e61fe24f4d663c4bae99cfa62 upstream. When panfrost_mmu_map_fault_addr() fails, the BO's mapping should be unreferenced and not the shmem object which backs the mapping. Cc: stable@vger.kernel.org Fixes: bdefca2d8dc0 ("drm/panfrost: Add the panfrost_gem_mapping concept") Reviewed-by: Steven Price Signed-off-by: Dmitry Osipenko Signed-off-by: Steven Price Link: https://patchwork.freedesktop.org/patch/msgid/20220630200601.1884120-2-dmitry.osipenko@collabora.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -491,7 +491,7 @@ err_map: err_pages: drm_gem_shmem_put_pages(&bo->base); err_bo: - drm_gem_object_put(&bo->base.base); + panfrost_gem_mapping_put(bomapping); return ret; }