aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>2012-10-03 17:15:26 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-20 12:58:53 -0700
commitf77ce97ae2bc14cd3a340b3ce91008350fc3fa3f (patch)
tree4e8d74729ddaf3494747c8d87379b5bc8a54c3c2 /drivers/gpu/drm
parentd039dc5859a079df992b83138e8dec32f5c8fbf0 (diff)
downloadkernel_samsung_smdk4412-f77ce97ae2bc14cd3a340b3ce91008350fc3fa3f.zip
kernel_samsung_smdk4412-f77ce97ae2bc14cd3a340b3ce91008350fc3fa3f.tar.gz
kernel_samsung_smdk4412-f77ce97ae2bc14cd3a340b3ce91008350fc3fa3f.tar.bz2
drm/i915: EBUSY status handling added to i915_gem_fault().
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 5548593..46e04a1 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1256,6 +1256,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;