public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: EBUSY status handling added to i915_gem_fault().
@ 2012-10-03 13:27 mika.kuoppala
  2012-10-03 13:27 ` [PATCH 2/3] drm/i915: print kernel warning if vmi915_gem_fault returns with error mika.kuoppala
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: mika.kuoppala @ 2012-10-03 13:27 UTC (permalink / raw)
  To: intel-gfx; +Cc: Dmitry Rogozhkin

From: Dmitry Rogozhkin <dmitry.v.rogozhkin@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@intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@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

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

end of thread, other threads:[~2012-10-03 14:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 13:27 [PATCH 1/3] drm/i915: EBUSY status handling added to i915_gem_fault() mika.kuoppala
2012-10-03 13:27 ` [PATCH 2/3] drm/i915: print kernel warning if vmi915_gem_fault returns with error mika.kuoppala
2012-10-03 13:27 ` [PATCH 3/3] Documentation: kernel-parameters.txt Add drm_kms_helper.poll mika.kuoppala
2012-10-03 14:15 ` [PATCH v2 1/2] drm/i915: EBUSY status handling added to i915_gem_fault() mika.kuoppala
2012-10-03 14:15   ` [PATCH v2 2/2] drm/i915: print warning if vmi915_gem_fault error is not handled mika.kuoppala
2012-10-03 14:25     ` Chris Wilson
2012-10-03 14:27   ` [PATCH v2 1/2] drm/i915: EBUSY status handling added to i915_gem_fault() Chris Wilson
2012-10-03 14:30     ` Daniel Vetter

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