]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/i915: Disable pagefaults along execbuffer relocation fast path
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 14 Mar 2011 15:11:24 +0000 (15:11 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 23 Mar 2011 09:17:01 +0000 (09:17 +0000)
commitd4aeee776017b6da6dcd12f453cd82a3c951a0dc
tree987afd679a2c2352856744404173b02569c713f7
parented0291fd16f6349ef43d3f25a4626c2f7baf568b
drm/i915: Disable pagefaults along execbuffer relocation fast path

Along the fast path for relocation handling, we attempt to copy directly
from the user data structures whilst holding our mutex. This causes
lockdep to warn about circular lock dependencies if we need to pagefault
the user pages. [Since when handling a page fault on a mmapped bo, we
need to acquire the struct mutex whilst already holding the mm
semaphore, it is then verboten to acquire the mm semaphore when already
holding the struct mutex. The likelihood of the user passing in the
relocations contained in a GTT mmaped bo is low, but conceivable for
extreme pathology.] In order to force the mm to return EFAULT rather
than handle the pagefault, we therefore need to disable pagefaults
across the relocation fast path.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_execbuffer.c