Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4449173imw; Tue, 19 Jul 2022 06:52:12 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tzGf6wOlmrjGoJyvAHrTbjgG7pFz7ZSponDFPsEh0EwvixsgOWA5b+iX0cFOrv7p16ZHLq X-Received: by 2002:a05:6402:46:b0:43a:f611:5992 with SMTP id f6-20020a056402004600b0043af6115992mr44703359edu.18.1658238732495; Tue, 19 Jul 2022 06:52:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658238732; cv=none; d=google.com; s=arc-20160816; b=pK0M+7kDjNKh6XI/CZHp4MheYTidcLyOliTd5TiH2aAp4UGnuRA1K7bOJl8hYaJq+m thBkBohsbIt2e5dfBrdjQdAX1iOvFZgFNnJz5YEJeb7qXt5ttey/0ATIcZETOL2Av/93 9s5/WlJcVKWYU00Hd+NLXqgGwyzXinfyxNBrkmAcS4LQftLb8NzT3M0ALgjS2HfYAYUM yVvBruZWO+YfUrcwDDQqQUlumjpyDXWYZv+oZ+C3yXCEtUoGBsQT7kbYG/N2CUxuoISM snTKzYL6bFCCuRz/bQU9wo5GjkU1wry+IUmXl6fXvWgboQgXoqMR1uDUxbDd/Y5AHBhi Ys7g== 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=o/Pj92+JSQcXJJgyPU711RRzvrbjPtQ8R+X/651coyQ=; b=Xi8v+4lQ+bf0ut0bLrAYcFEoAk8TLOXPEmDeL3EJkY9KIQ2CdPyaqZp28Djw9Aic4c huJJkYv7dWoXEaO6tHrwNDUnjvIvi0FsQBRmj3Y9hR72PByRP/4/i1N6NjNDbPvv6+jn RwDzRHW+jGhtp0GkWHttDVM+pO8qk+4efZiGYQHaX8vKmOrMPwh4WJ0HSUf9Y1xgNNXj uvcs3MlecdI0PgPm7CmF8ZeZ8u6Kq4sYDTviYQe7xIYaa8u7h7SDtPEWSDG5GdZLbjJb jCLh0NOsZ4LhaMIyS3UUPRRqKhzd2QLXbbhq+tjnzRr2J4kQ8wWq/hY/vAeky+iddo2B ujZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tMZHbfb0; 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 n8-20020aa7c688000000b0043a4ccd63e5si17956756edq.82.2022.07.19.06.51.47; Tue, 19 Jul 2022 06:52:12 -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=tMZHbfb0; 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 S240668AbiGSMf6 (ORCPT + 99 others); Tue, 19 Jul 2022 08:35:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240299AbiGSMdy (ORCPT ); Tue, 19 Jul 2022 08:33:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E644F74E0E; Tue, 19 Jul 2022 05:13:00 -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 2182C6178A; Tue, 19 Jul 2022 12:12:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E281FC341C6; Tue, 19 Jul 2022 12:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1658232742; bh=b62/LnGN3DMyJH6v6wEGeykOzNPEdSGpc3TGkTYraqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tMZHbfb0WTbt1PnIRXebMeHpcFssdJ94UhjK/rXhv8MGYnnUy2Fch2LDTHIrezaP4 XywlEDcI/x5pCsorlM5mQPYXVCjJ9NLdL5DeLYPnG/9vDI38cORYOjOuxzw0jPAHmO 51htYWTia7EnYacBzwII+63Ry+KyFqcl3HYowCNc= 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.15 020/167] drm/panfrost: Put mapping instead of shmem obj on panfrost_mmu_map_fault_addr() error Date: Tue, 19 Jul 2022 13:52:32 +0200 Message-Id: <20220719114658.709020344@linuxfoundation.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220719114656.750574879@linuxfoundation.org> References: <20220719114656.750574879@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 @@ -501,7 +501,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; }