From 7636f3813f3b82ed9a4e17694dcb698984860f61 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 20 Oct 2013 12:07:42 -0400 Subject: [PATCH] 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 7cf7b4323116fe1fc7e40add523998646cfe934e ("drm/i915: EBUSY status handling added to i915_gem_fault()"). Signed-off-by: Rob Clark Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- 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 baa714c8ec70d..9ac30560e9b10 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; -- 2.39.5