Skip to content

Commit e79e0fe

Browse files
dvrogozhdanvet
authored andcommitted
drm/i915: EBUSY status handling added to i915_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. Note that this fixes i-g-t/tests/gem_threaded_tiled_access. Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 2477367 commit e79e0fe

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/i915/i915_gem.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1400,6 +1400,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
14001400
case 0:
14011401
case -ERESTARTSYS:
14021402
case -EINTR:
1403+
case -EBUSY:
1404+
/*
1405+
* EBUSY is ok: this just means that another thread
1406+
* already did the job.
1407+
*/
14031408
return VM_FAULT_NOPAGE;
14041409
case -ENOMEM:
14051410
return VM_FAULT_OOM;

0 commit comments

Comments
 (0)