[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200122092815.819897902@linuxfoundation.org>
Date: Wed, 22 Jan 2020 10:29:47 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Jon Derrick <jonathan.derrick@...el.com>,
Ben Skeggs <bskeggs@...hat.com>,
Sushma Kalakota <sushmax.kalakota@...el.com>
Subject: [PATCH 4.19 091/103] drm/nouveau/mmu: qualify vmm during dtor
From: Jon Derrick <jonathan.derrick@...el.com>
commit 15516bf9abaa41421a6ded79a5a2fee86f9594e5 upstream.
If the BAR initialization failed it may leave the vmm structure in an
unitialized state, leading to a null-pointer-dereference when the vmm is
dereferenced during teardown.
Signed-off-by: Jon Derrick <jonathan.derrick@...el.com>
Signed-off-by: Ben Skeggs <bskeggs@...hat.com>
Signed-off-by: Sushma Kalakota <sushmax.kalakota@...el.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@ -1423,7 +1423,7 @@ nvkm_vmm_get(struct nvkm_vmm *vmm, u8 pa
void
nvkm_vmm_part(struct nvkm_vmm *vmm, struct nvkm_memory *inst)
{
- if (inst && vmm->func->part) {
+ if (inst && vmm && vmm->func->part) {
mutex_lock(&vmm->mutex);
vmm->func->part(vmm, inst);
mutex_unlock(&vmm->mutex);
Powered by blists - more mailing lists