dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: EBUSY status handling in omap_gem_fault()
@ 2013-10-20 16:07 Rob Clark
  0 siblings, 0 replies; only message in thread
From: Rob Clark @ 2013-10-20 16:07 UTC (permalink / raw)
  To: dri-devel; +Cc: Kiran

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.

See e79e0fe3

Signed-off-by: Rob Clark <robdclark@gmail.com>
---
 drivers/gpu/drm/omapdrm/omap_gem.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index 533f6eb..435c6b1 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -542,6 +542,11 @@ fail:
 	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.8.3.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-10-20 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-20 16:07 [PATCH] drm/omap: EBUSY status handling in omap_gem_fault() Rob Clark

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