summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2023-08-07 19:32:25 +0300
committerDanilo Krummrich <dakr@redhat.com>2023-08-08 05:47:19 +0300
commit3cbc772107af4d57a2e2a7eb7fe711c334fd008a (patch)
tree1c4d23a169dafdfb301efb8d4715471de446ea31 /drivers/gpu/drm/nouveau
parente39701e33a438108eefb851cdde1ac1e40d683db (diff)
downloadlinux-3cbc772107af4d57a2e2a7eb7fe711c334fd008a.tar.xz
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: b88baab82871 ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: kernel test robot <lkp@intel.com> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230807163238.2091-5-dakr@redhat.com
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_uvmm.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_uvmm.c b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
index 2acbac73e57a..91b964ef98b1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_uvmm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_uvmm.c
@@ -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;