drm/i915: Handle ERESTARTSYS during page fault
commit1934acbe047d32dcdf74ad75d61c8646ca0ced7b
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 22 Sep 2009 23:43:56 +0000 (23 00:43 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:33:02 +0000 (5 09:33 -0700)
treeb384402931eab74ca1e01a2dfbbeb13ae0547dab
parent03429ffaea91375d8ed80a60fa13c9ffe694539a
drm/i915: Handle ERESTARTSYS during page fault

commit c715089f49844260f1eeae8e3b55af9468ba1325 upstream.

During a page fault and rebinding the buffer there exists a window for a
signal to arrive during the i915_wait_request() and trigger a
ERESTARTSYS. This used to be handled by returning SIGBUS and thereby
killing the application. Try 'cairo-perf-trace & cairo-test-suite' and
watch X go boom!

The solution as suggested by H. Peter Anvin is to simply return NOPAGE and
leave the higher layers to spot we did not fill the page and resubmit
the page fault.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[anholt: Mostly squash it with another commit]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/i915_gem.c