From: Chris Wilson Date: Sun, 21 Nov 2010 22:07:12 +0000 (+0000) Subject: drm/i915: Handle pagefaults in execbuffer user relocations X-Git-Tag: v2.6.37-rc5~39^2~6^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcf50e2775bbc3101932d8e4ab8c7902aa4163b4;p=pandora-kernel.git drm/i915: Handle pagefaults in execbuffer user relocations 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 Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter --- Reading git-diff-tree failed