Skip to contentSkip to conversation

drm/nouveau: fix memory leak

PATCH In review Sudip Mukherjee 3 participants 7 messages Sep 11, 2015 – Oct 14, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/nouveau: fix memory leak

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

---
 drivers/gpu/drm/nouveau/nouveau_gem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/nouveau/nouveau_gem.c +3 -1
index 2c99815..c05b2f7 100644
@@ -84,8 +84,10 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 		}
 
 		ret = pm_runtime_get_sync(dev);
-		if (ret < 0 && ret != -EACCES)
+		if (ret < 0 && ret != -EACCES) {
+			kfree(vma);
 			goto out;
+		}
 
 		ret = nouveau_bo_vma_add(nvbo, cli->vm, vma);
 		if (ret)
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
Quoted 6 lines · Sudip Mukherjee
Quoted 4 lines · Sudip Mukherjee

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

Hi Ben, Another gentle ping for another patch.

Both patches are in my tree.

Thanks,
Ben.

Quoted 5 lines

regards sudip _______________________________________________ dri-devel mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 8 lines · Ben Skeggs
Quoted 6 lines · Sudip Mukherjee
Quoted 4 lines · Sudip Mukherjee

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

Hi Ben, Another gentle ping for another patch.

Both patches are in my tree.

Thanks Ben.

regards
sudip
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
In reply to Ben Skeggs
Quoted 8 lines · Ben Skeggs
Quoted 6 lines · Sudip Mukherjee
Quoted 4 lines · Sudip Mukherjee

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

Hi Ben, Another gentle ping for another patch.

Both patches are in my tree.

Hi Ben,
I am not seeing these in linux-next.

regards
sudip
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
Quoted 6 lines · Sudip Mukherjee
Quoted 5 lines · Ben Skeggs
Quoted 4 lines · Sudip Mukherjee
Quoted 3 lines · Sudip Mukherjee

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
Quoted 1 line

Hi Ben, Another gentle ping for another patch.

Both patches are in my tree.

Hi Ben,
I am not seeing these in linux-next.

The nouveau tree does not merge into linux-next I'm afraid. Perhaps we should as Ben gets the chance/time.

Regards,
Emil

#6 lore raw
Quoted 8 lines · Emil Velikov
Quoted 7 lines · Sudip Mukherjee
Quoted 6 lines · Ben Skeggs
Quoted 5 lines · Sudip Mukherjee
Quoted 4 lines · Sudip Mukherjee

If pm_runtime_get_sync() we were going to "out" but we missed freeing vma.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Quoted 1 line

Hi Ben, Another gentle ping for another patch.

Both patches are in my tree.

Hi Ben,
I am not seeing these in linux-next.

The nouveau tree does not merge into linux-next I'm afraid. Perhaps we should as Ben gets the chance/time.

Can I be of any help in that? Maybe I can learn few things about drm in the proces.

regards
sudip
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel