Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/external/bsd/drm2/dist/drm/i915 Pull up following rev...
details: https://anonhg.NetBSD.org/src/rev/46736e83dbdd
branches: netbsd-7
changeset: 799462:46736e83dbdd
user: snj <snj%NetBSD.org@localhost>
date: Sun Jul 05 21:31:48 2015 +0000
description:
Pull up following revision(s) (requested by chs in ticket #854):
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c: revision 1.31
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.
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_gem.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diffs (19 lines):
diff -r a4f047a697ba -r 46736e83dbdd sys/external/bsd/drm2/dist/drm/i915/i915_gem.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Jul 05 21:29:26 2015 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Sun Jul 05 21:31:48 2015 +0000
@@ -1869,6 +1869,15 @@
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 */
Home |
Main Index |
Thread Index |
Old Index