Commit 81da76ae authored by Dmitry Rogozhkin's avatar Dmitry Rogozhkin Committed by Greg Kroah-Hartman

drm/i915: EBUSY status handling added to i915_gem_fault().

commit e79e0fe3 upstream.

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.

Note that this fixes i-g-t/tests/gem_threaded_tiled_access.
Tested-by: default avatarMika Kuoppala <mika.kuoppala@intel.com>
Signed-off-by: default avatarDmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb505e2e
......@@ -1186,6 +1186,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
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;
......
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