From: Eric Anholt Date: Mon, 9 Mar 2009 16:42:23 +0000 (-0700) Subject: drm/i915: Fix lock order reversal in GTT pwrite path. X-Git-Tag: v2.6.30-rc1~646^2~20 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3de09aa3b38910d366f4710ffdf430c9d387d1a3;p=pandora-kernel.git drm/i915: Fix lock order reversal in GTT pwrite path. Since the pagefault path determines that the lock order we use has to be mmap_sem -> struct_mutex, we can't allow page faults to occur while the struct_mutex is held. To fix this in pwrite, we first try optimistically to see if we can copy from user without faulting. If it fails, fall back to using get_user_pages to pin the user's memory, and map those pages atomically when copying it to the GPU. Signed-off-by: Eric Anholt Reviewed-by: Jesse Barnes --- Reading git-diff-tree failed