From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 06BB7C433B4 for ; Mon, 10 May 2021 09:14:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8D45761285 for ; Mon, 10 May 2021 09:14:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D45761285 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F30689F97; Mon, 10 May 2021 09:14:52 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9DE4F89EBD for ; Mon, 10 May 2021 09:14:50 +0000 (UTC) IronPort-SDR: P5ZgcFAxDzkDCfZL82pthn3GiZRbE6eE/BO0AR/fdOJFmQm8Zw9/w30lYqB8pfrgPA1d4rtbrZ F/3apUbrzN7Q== X-IronPort-AV: E=McAfee;i="6200,9189,9979"; a="178737425" X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="178737425" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 02:14:49 -0700 IronPort-SDR: zql81OlQuQXstO1FU3Fyoj+R+ElaQeZmSyiwpz3BQEt/3E+3wquNu3abJsQ4hBbWn41VLDEz6v cNm871HCSjEg== X-IronPort-AV: E=Sophos;i="5.82,287,1613462400"; d="scan'208";a="536313389" Received: from agriffin-mobl1.ger.corp.intel.com (HELO [10.213.193.195]) ([10.213.193.195]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 02:14:48 -0700 To: Janusz Krzysztofik , intel-gfx@lists.freedesktop.org References: <20210507144251.376538-1-janusz.krzysztofik@linux.intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc Message-ID: <2abba1b7-ac7b-a983-39af-87b1b86b765a@linux.intel.com> Date: Mon, 10 May 2021 10:14:46 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210507144251.376538-1-janusz.krzysztofik@linux.intel.com> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Do release kernel context if breadcrumb measure fails X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Wilson Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 07/05/2021 15:42, Janusz Krzysztofik wrote: > Commit fb5970da1b42 ("drm/i915/gt: Use the kernel_context to measure the > breadcrumb size") reordered some operations inside engine_init_common() > and added an error unwind path to that function. In that path, a > reference to a kernel context candidate supposed to be released on error > was put, but the context, pinned when created, was not unpinned first. > Fix it by replacing intel_context_put() with destroy_pinned_context() > introduced later by commit b436a5f8b6c8 ("drm/i915/gt: Track all timelines > created using the HWSP"). > > Signed-off-by: Janusz Krzysztofik > Cc: Chris Wilson > --- > drivers/gpu/drm/i915/gt/intel_engine_cs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c > index 6dbdbde00f14..eba2da9679a5 100644 > --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c > +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c > @@ -898,7 +898,7 @@ static int engine_init_common(struct intel_engine_cs *engine) > return 0; > > err_context: > - intel_context_put(ce); > + destroy_pinned_context(ce); > return ret; > } > > Reviewed-by: Tvrtko Ursulin Found by some test or code inspection? Regards, Tvrtko _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx