Thread (255 messages) 255 messages, 5 authors, 2013-01-14
STALE4910d REVIEWED: 2 (0M)

[PATCH 163/241] drm/i915: EBUSY status handling added to i915_gem_fault().

From: Herton Ronaldo Krzesinski <hidden>
Date: 2012-12-13 14:10:56
Also in: lkml
Subsystem: drm drivers, intel drm i915 driver (meteor lake, dg2 and older excluding poulsbo, moorestown and derivative), the rest · Maintainers: David Airlie, Simona Vetter, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Tvrtko Ursulin, Linus Torvalds

3.5.7.2 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Dmitry Rogozhkin <redacted>

commit e79e0fe380847493266fba557217e2773c61bd1b upstream.

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.

Note that this fixes i-g-t/tests/gem_threaded_tiled_access.

Tested-by: Mika Kuoppala <redacted>
Signed-off-by: Dmitry Rogozhkin <redacted>
Reviewed-by: Chris Wilson <redacted>
Signed-off-by: Daniel Vetter <redacted>
Signed-off-by: Herton Ronaldo Krzesinski <redacted>
---
 drivers/gpu/drm/i915/i915_gem.c |    5 +++++
 1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index fc6683a..4dc8a9b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1144,6 +1144,11 @@ 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help