fix Xorg coredumps that have started happening recently.
the problem is that we get a SIGALRM while we're sleeping during a page fault on a mapping of a GEM object, and since we're sleeping interruptibly, the GEM operation fails with EINTR. this error is returned all the way back through uvm_fault() to the trap handler, which responds to that error by delivering a SIGSEGV. fix this by doing like the linux version of the GEM fault handler and converting EINTR into success, which results in delivering the original signal and retrying the fault.
This commit is contained in:
parent
5b544a3657
commit
64838c167e
@ -1869,6 +1869,15 @@ out:
|
||||
uvmfault_unlockall(ufi, ufi->entry->aref.ar_amap, uobj);
|
||||
if (ret == -ERESTART)
|
||||
uvm_wait("i915flt");
|
||||
|
||||
/*
|
||||
* Remap EINTR to success, so that we return to userland.
|
||||
* On the way out, we'll deliver the signal, and if the signal
|
||||
* is not fatal then the user code which faulted will most likely
|
||||
* fault again, and we'll come back here for another try.
|
||||
*/
|
||||
if (ret == -EINTR)
|
||||
ret = 0;
|
||||
/* XXX Deal with GPU hangs here... */
|
||||
intel_runtime_pm_put(dev_priv);
|
||||
/* XXX errno Linux->NetBSD */
|
||||
|
Loading…
x
Reference in New Issue
Block a user