From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Unref context on failed eb_create Date: Sat, 5 Apr 2014 17:24:35 +0200 Message-ID: <20140405152435.GY7225@phenom.ffwll.local> References: <1396676467-21368-1-git-send-email-benjamin.widawsky@intel.com> <20140405062401.GC8475@nuc-i3427.alporthouse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f177.google.com (mail-we0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 6949E6E059 for ; Sat, 5 Apr 2014 08:24:38 -0700 (PDT) Received: by mail-we0-f177.google.com with SMTP id u57so4782359wes.36 for ; Sat, 05 Apr 2014 08:24:37 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20140405062401.GC8475@nuc-i3427.alporthouse.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson , Ben Widawsky , Intel GFX List-Id: intel-gfx@lists.freedesktop.org On Sat, Apr 05, 2014 at 07:24:01AM +0100, Chris Wilson wrote: > On Fri, Apr 04, 2014 at 10:41:07PM -0700, Ben Widawsky wrote: > > I opted to do this instead of grabbing the context reference after > > eb_create since eb_create can potentially call the shrinker, and that > > makes things very complicated. This simple patch balances the ref count > > without requiring a great deal of review to make sure the shrinker path > > is safe. > > > > Theoretically (by design) the shrinker can end up destroying a context, > > which enforces the reasoning for doing the fix this way instead of > > moving the reference to later in the function. > > > > Cc: Chris Wilson > > Signed-off-by: Ben Widawsky > > Even the whitespace fix is correct. > Reviewed-by: Chris Wilson Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch