From: Rob Clark Date: Sun, 20 Oct 2013 16:07:42 +0000 (-0400) Subject: drm/omap: EBUSY status handling in omap_gem_fault() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e1d4ee0f2b8dd77f67798544f58ce4bee4fdddf9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Tomi Valkeinen Acked-by: Laurent Pinchart --- 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;