]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: EBUSY status handling added to i915_gem_fault().
authorDmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
Wed, 3 Oct 2012 14:15:26 +0000 (17:15 +0300)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 3 Jan 2013 03:32:53 +0000 (03:32 +0000)
commit e79e0fe380847493266fba557217e2773c61bd1b 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: 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>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/i915_gem.c

index dbe4dbe464752f961debd0468e2d81abec9ee6dc..5950ba35ba9b427cc2913d1c0646232ef6b64daa 100644 (file)
@@ -1259,6 +1259,11 @@ out:
        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;