Commit 9e267d28 authored by Chris Wilson's avatar Chris Wilson

drm/i915/userptr: Fix error handling of mutex_lock_killable()

mutex_lock_killable() returns -EINTR on failure, not the anticipate bool
return like trylock. (Oh no, not again.)

Fixes: 484d9a84 ("drm/i915/userptr: Avoid struct_mutex recursion for mmu_invalidate_range_start")
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190115221118.13304-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
parent 0212bdef
...@@ -150,7 +150,7 @@ userptr_mn_invalidate_range_start(struct mmu_notifier *_mn, ...@@ -150,7 +150,7 @@ userptr_mn_invalidate_range_start(struct mmu_notifier *_mn,
switch (mutex_trylock_recursive(unlock)) { switch (mutex_trylock_recursive(unlock)) {
default: default:
case MUTEX_TRYLOCK_FAILED: case MUTEX_TRYLOCK_FAILED:
if (!mutex_lock_killable_nested(unlock, I915_MM_SHRINKER)) { if (mutex_lock_killable_nested(unlock, I915_MM_SHRINKER)) {
i915_gem_object_put(obj); i915_gem_object_put(obj);
return -EINTR; return -EINTR;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment