[Intel-gfx] [PATCH 1/3] drm/i915: EBUSY status handling added to i915_gem_fault().

mika.kuoppala at intel.com mika.kuoppala at intel.com
Wed Oct 3 15:27:00 CEST 2012


From: Dmitry Rogozhkin <dmitry.v.rogozhkin at intel.com>

Subsequent threads returning EBUSY from vm_insert_pfn() was not handled
correctly. As a result concurrent access from new threads to
mmapped data caused SIGBUS.

Tested-by: Mika Kuoppala <mika.kuoppala at intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin at intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 274d25d..18d9abb 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1158,6 +1158,10 @@ out:
 	case 0:
 	case -ERESTARTSYS:
 	case -EINTR:
+	case -EBUSY:
+		/* EBUSY is ok: this just means that another thread
+		   already did the job.
+		*/
 		return VM_FAULT_NOPAGE;
 	case -ENOMEM:
 		return VM_FAULT_OOM;
-- 
1.7.9.5




More information about the Intel-gfx mailing list