Skip to content

Commit

Permalink
drm/i915: Handle pagefaults in execbuffer user relocations
Browse files Browse the repository at this point in the history
Currently if we hit a pagefault when applying a user relocation for the
execbuffer, we bail and return EFAULT to the application. Instead, we
need to unwind, drop the dev->struct_mutex, copy all the relocation
entries to a vmalloc array (to avoid any potential circular deadlocks
when resolving the pagefault), retake the mutex and then apply the
relocations.  Afterwards, we need to again drop the lock and copy the
vmalloc array back to userspace.

v2: Incorporate feedback from Daniel Vetter.

Reported-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson committed Nov 23, 2010
1 parent da79de9 commit bcf50e2
Showing 1 changed file with 293 additions and 168 deletions.
Loading

0 comments on commit bcf50e2

Please sign in to comment.