[Intel-gfx] [PATCH 6/8] drm/i915: Pin the pages first in shmem prepare read/write

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jun 9 13:51:41 UTC 2016


On to, 2016-06-09 at 14:35 +0100, Chris Wilson wrote:
> On Thu, Jun 09, 2016 at 04:06:59PM +0300, Joonas Lahtinen wrote:
> > 
> > On to, 2016-06-09 at 12:29 +0100, Chris Wilson wrote:
> > > 
> > > There is an improbable, but not impossible, case that if we leave the
> > > pages unpin as we operate on the object, then somebody may steal the
> > > lock and change the cache domains after we have already inspected them.
> > > 
> > Which lock exactly?
> The shrinker steals struct_mutex from underneath us. The guard is
> pinning pages around operating on the object.

Wouldn't the race scenario I described then apply (between get_pages
and pin_pages)?

> -Chris
> 
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list