Commit e1d4ee0f authored by Rob Clark's avatar Rob Clark Committed by Tomi Valkeinen

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 e79e0fe3 ("drm/i915: EBUSY status
handling added to i915_gem_fault()").
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
parent be4f235c
...@@ -578,6 +578,11 @@ int omap_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -578,6 +578,11 @@ int omap_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
case 0: case 0:
case -ERESTARTSYS: case -ERESTARTSYS:
case -EINTR: case -EINTR:
case -EBUSY:
/*
* EBUSY is ok: this just means that another thread
* already did the job.
*/
return VM_FAULT_NOPAGE; return VM_FAULT_NOPAGE;
case -ENOMEM: case -ENOMEM:
return VM_FAULT_OOM; return VM_FAULT_OOM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment