Re: [Intel-gfx] [PATCH v2] drm/i915: Fix userptr deadlock with MAP_FIXED
From: Chris Wilson <hidden>
Date: 2015-06-30 15:47:30
Also in:
intel-gfx
From: Chris Wilson <hidden>
Date: 2015-06-30 15:47:30
Also in:
intel-gfx
On Tue, Jun 30, 2015 at 04:31:15PM +0100, Chris Wilson wrote:
That suggests MAP_FIXED is special in invalidating the range unlike a normal mmap(). This is arguing that we must always make any access after invalidate_range be EFAULT. The danger here is that I am not sure if there are any circumstances where invalidate_range is called and the vma survives. Looking again at mm/, I can't see any place where we can legally be expecting to reuse the same address for a userptr after the invalidate.
Sigh, changing page protections (e.g. after a fork) if I am not mistaken also generates an invalidate_range. Back to the drawing board here I am afraid, as I think I need a worker to do cancel_userptr with all the complications of coordinating between the multiple workers. -Chris -- Chris Wilson, Intel Open Source Technology Centre