From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com ([192.55.52.43]:35670 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932471AbdC3LaR (ORCPT ); Thu, 30 Mar 2017 07:30:17 -0400 Message-ID: <1490873412.3067.4.camel@linux.intel.com> Subject: Re: [PATCH] drm/i915: Use a dummy timeline name for a signaled fence From: Joonas Lahtinen To: Chris Wilson , intel-gfx@lists.freedesktop.org Cc: =?UTF-8?Q?Micha=C5=82?= Winiarski , "# v4 . 10+" Date: Thu, 30 Mar 2017 14:30:12 +0300 In-Reply-To: <20170330111905.GF1895@nuc-i3427.alporthouse.com> References: <20170330111614.29757-1-chris@chris-wilson.co.uk> <20170330111905.GF1895@nuc-i3427.alporthouse.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: On to, 2017-03-30 at 12:19 +0100, Chris Wilson wrote: > On Thu, Mar 30, 2017 at 12:16:14PM +0100, Chris Wilson wrote: > > > > MichaƂ Winiarski pointed out that the debugging infrastructure (such as > > trace_dma_fence_release) likes to pretty print the timeline name, long > > after we have freed the timeline. Our timelines currently live as part of > > the GTT (due to the strict ordering we current use through each) which > s/current/currently/ > > > > > belong to the context. We aim to free the context and release its > > hardware resources as soon as we able to (i.e. when the last > > fence/request using it has been signaled and retired). As the > > .get_timeline_name is purely a debug feature, rather than extending the > > lifetime of the context, or splitting it into many different release > > phases just to keep the name along, replace the timeline name with a > s/along/around/ > > > > > constant after the fence has been signaled. This avoids the potential > > use-after-free. Reviewed-by: Joonas Lahtinen Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation