drm/msm: EBUSY status handling in msm_gem_fault()
authorRob Clark <robdclark@gmail.com>
Sun, 20 Oct 2013 15:57:52 +0000 (11:57 -0400)
committerRob Clark <robdclark@gmail.com>
Fri, 1 Nov 2013 16:39:45 +0000 (12:39 -0400)
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

Signed-off-by: Rob Clark <robdclark@gmail.com>
Acked-by: David Brown <davidb@codeaurora.org>
drivers/gpu/drm/msm/msm_gem.c

index 291939d..e587d25 100644 (file)
@@ -178,6 +178,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;