Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Convert EFAULT into a silent SIGBUS
@ 2014-01-31 11:34 Chris Wilson
  2014-01-31 11:34 ` [PATCH 2/2] drm/i915: Treat using a purged buffer as a source of EFAULT Chris Wilson
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Wilson @ 2014-01-31 11:34 UTC (permalink / raw)
  To: intel-gfx

EFAULT will be a possible return code where backing storage is
transient, such after it is purged by madvise. As such it is to be
expected and so should not trigger a WARN inside i915_gem_fault() but be
converted silently to SIGBUS.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index d58f777903c0..f2ef2c8518ba 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1574,6 +1574,7 @@ out:
 		ret = VM_FAULT_OOM;
 		break;
 	case -ENOSPC:
+	case -EFAULT:
 		ret = VM_FAULT_SIGBUS;
 		break;
 	default:
-- 
1.9.rc1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-02-04 16:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-31 11:34 [PATCH 1/2] drm/i915: Convert EFAULT into a silent SIGBUS Chris Wilson
2014-01-31 11:34 ` [PATCH 2/2] drm/i915: Treat using a purged buffer as a source of EFAULT Chris Wilson
2014-02-04 11:05   ` Daniel Vetter
2014-02-04 11:36     ` Chris Wilson
2014-02-04 13:23       ` Daniel Vetter
2014-02-04 14:14         ` [PATCH] tests: Add gem_madvise Chris Wilson
2014-02-04 16:04           ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox