Skip to content

Commit 3cbc772

Browse files
committed
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: b88baab ("drm/nouveau: implement new VM_BIND uAPI") Reported-by: kernel test robot <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e39701e commit 3cbc772

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/gpu/drm/nouveau/nouveau_uvmm.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,15 +279,11 @@ __nouveau_uvma_region_insert(struct nouveau_uvmm *uvmm,
279279
u64 last = addr + range - 1;
280280
MA_STATE(mas, &uvmm->region_mt, addr, addr);
281281

282-
if (unlikely(mas_walk(&mas))) {
283-
mas_unlock(&mas);
282+
if (unlikely(mas_walk(&mas)))
284283
return -EEXIST;
285-
}
286284

287-
if (unlikely(mas.last < last)) {
288-
mas_unlock(&mas);
285+
if (unlikely(mas.last < last))
289286
return -EEXIST;
290-
}
291287

292288
mas.index = addr;
293289
mas.last = last;

0 commit comments

Comments
 (0)