From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm/i915: Hold mutex across i915_gem_release Date: Wed, 4 Dec 2013 17:07:47 +0100 Message-ID: <20131204160747.GF27344@phenom.ffwll.local> References: <1386168726-7772-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1386168726-7772-1-git-send-email-chris@chris-wilson.co.uk> Sender: stable-owner@vger.kernel.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, stable@vger.kernel.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Dec 04, 2013 at 02:52:06PM +0000, Chris Wilson wrote: > Inorder to serialise the closing of the file descriptor and its > subsequent release of client requests with i915_gem_free_request(), we > need to hold the struct_mutex in i915_gem_release(). Failing to do so > has the potential to trigger an OOPS, later with a use-after-free. > > Testcase: igt/gem_close_race > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70874 > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71029 > Reported-by: Eric Anholt > Signed-off-by: Chris Wilson > Cc: stable@vger.kernel.org Picked up for -fixes, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch