From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com ([192.55.52.88]:22046 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166AbdLDMrA (ORCPT ); Mon, 4 Dec 2017 07:47:00 -0500 Message-ID: <1512391618.4394.35.camel@linux.intel.com> Subject: Re: [PATCH] drm/i915: Flush pending GTT writes before unbinding From: Joonas Lahtinen To: Chris Wilson , intel-gfx@lists.freedesktop.org Cc: stable@vger.kernel.org Date: Mon, 04 Dec 2017 14:46:58 +0200 In-Reply-To: <20171204124307.2583-1-chris@chris-wilson.co.uk> References: <20171204124307.2583-1-chris@chris-wilson.co.uk> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On Mon, 2017-12-04 at 12:43 +0000, Chris Wilson wrote: > From the shrinker paths, we want to relinquish the GPU and GGTT access to > the object, releasing the backing storage back to the system for > swapout. As a part of that process we would unpin the pages, marking > them for access by the CPU (for the swapout/swapin). However, if that > process was interrupted after unbind the vma, we missed a flush of the > inflight GGTT writes before we made that GTT space available again for > reuse, with the prospect that we would redirect them to another page. > > The bug dates back to the introduction of multiple GGTT vma, but the > code itself dates to commit 02bef8f98d26 ("drm/i915: Unbind closed vma > for i915_gem_object_unbind()"). > > Fixes: 02bef8f98d26 ("drm/i915: Unbind closed vma for i915_gem_object_unbind()") > Fixes: c5ad54cf7dd8 ("drm/i915: Use partial view in mmap fault handler") > Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen > Cc: stable@vger.kernel.org Reviewed-by: Joonas Lahtinen Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation