diff options
author | Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com> | 2012-10-03 10:15:26 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-10-04 04:33:42 -0400 |
commit | e79e0fe380847493266fba557217e2773c61bd1b (patch) | |
tree | 97e55deebc73b06739e28811f592e5ca6231065c /drivers/gpu | |
parent | 2477367083b3eaa97f87993ab26627a02f350551 (diff) |
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>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 5 |
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 76bbb379d389..5fa3419461c5 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1400,6 +1400,11 @@ out: | |||
1400 | case 0: | 1400 | case 0: |
1401 | case -ERESTARTSYS: | 1401 | case -ERESTARTSYS: |
1402 | case -EINTR: | 1402 | case -EINTR: |
1403 | case -EBUSY: | ||
1404 | /* | ||
1405 | * EBUSY is ok: this just means that another thread | ||
1406 | * already did the job. | ||
1407 | */ | ||
1403 | return VM_FAULT_NOPAGE; | 1408 | return VM_FAULT_NOPAGE; |
1404 | case -ENOMEM: | 1409 | case -ENOMEM: |
1405 | return VM_FAULT_OOM; | 1410 | return VM_FAULT_OOM; |