[Intel-gfx] [PATCH 04/25] drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start

Chris Wilson chris at chris-wilson.co.uk
Tue Nov 6 13:11:58 UTC 2018


Quoting Chris Wilson (2018-11-06 13:02:35)
> Quoting Tvrtko Ursulin (2018-11-06 12:41:53)
> > I am also worried about the lock dropping a few lines above. It's 
> > definitely correct to restart every time, but can we get in a situation 
> > where we never exit the loop?
> 
> That would require a user with the mmap_sem for writing as we hold the
> mmap_sem for reading, afaict.

Wrong thing. The answer is that we are not meant to insert overlapping
objects with an on-going invalidate_range (between start/end), which we
obviously violate. That the insert/invalidate is racy is a minor point
in the grand scheme of fails.
-Chris


More information about the Intel-gfx mailing list