aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_gem.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2013-10-20 12:07:42 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 17:36:43 +0200
commite1d4ee0f2b8dd77f67798544f58ce4bee4fdddf9 (patch)
treec5a87d02e589680daa904cea6b6aadf6d96f49cb /drivers/gpu/drm/omapdrm/omap_gem.c
parentdrm/omap: verify that fb plane pitches are the same (diff)
downloadlinux-dev-e1d4ee0f2b8dd77f67798544f58ce4bee4fdddf9.tar.xz
linux-dev-e1d4ee0f2b8dd77f67798544f58ce4bee4fdddf9.zip
drm/omap: EBUSY status handling in omap_gem_fault()
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 e79e0fe380847493266fba557217e2773c61bd1b ("drm/i915: EBUSY status handling added to i915_gem_fault()"). Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index baa714c8ec70..9ac30560e9b1 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -578,6 +578,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;