lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230807163238.2091-5-dakr@redhat.com>
Date:   Mon,  7 Aug 2023 18:32:25 +0200
From:   Danilo Krummrich <dakr@...hat.com>
To:     airlied@...il.com, daniel@...ll.ch, bskeggs@...hat.com,
        kherbst@...hat.com, lyude@...hat.com, sfr@...b.auug.org.au
Cc:     dri-devel@...ts.freedesktop.org, nouveau@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, Danilo Krummrich <dakr@...hat.com>,
        kernel test robot <lkp@...el.com>
Subject: [PATCH drm-misc-next 4/5] 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@...el.com>
Signed-off-by: Danilo Krummrich <dakr@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ