lkml.org 
[lkml]   [2023]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH drm-misc-next 4/5] drm/nouveau: uvmm: remove incorrect calls to mas_unlock()
Date
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>
Signed-off-by: Danilo Krummrich <dakr@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_uvmm.c | 8 ++------
1 file 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;
--
2.41.0
\
 
 \ /
  Last update: 2023-08-07 18:35    [W:0.259 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site