Commit 3cbc7721 authored by Danilo Krummrich's avatar Danilo Krummrich

drm/nouveau: uvmm: remove incorrect calls to mas_unlock()

Remove incorrect calls to mas_unlock() in the unwind path of
__nouveau_uvma_region_insert(). The region maple tree uses an external
lock instead, namely the global uvmm lock.

Fixes: b88baab8 ("drm/nouveau: implement new VM_BIND uAPI")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Reviewed-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-5-dakr@redhat.com
parent e39701e3
......@@ -279,15 +279,11 @@ __nouveau_uvma_region_insert(struct nouveau_uvmm *uvmm,
u64 last = addr + range - 1;
MA_STATE(mas, &uvmm->region_mt, addr, addr);
if (unlikely(mas_walk(&mas))) {
mas_unlock(&mas);
if (unlikely(mas_walk(&mas)))
return -EEXIST;
}
if (unlikely(mas.last < last)) {
mas_unlock(&mas);
if (unlikely(mas.last < last))
return -EEXIST;
}
mas.index = addr;
mas.last = last;
......
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