drm/nouveau: Do not leak client objects
Subsystems (3)
PATCH 1/1 drm/nouveau: Do not leak client objects
From: Thierry Reding <[email protected]>
The memory allocated for a nouveau_cli object in nouveau_cli_create() is never freed. Free the memory in nouveau_cli_destroy() to plug this leak.
kmemleak recorded this after running a couple of nouveau test programs. Note that kmemleak points at drm_open_helper() because for some reason it thinks that skipping the first two stack frames is a good idea.
--- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nouveau_drm.c +1 -0
@@ -126,6 +126,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli)nouveau_vm_ref (NULL , &nvkm_client (&cli->base)->vm,NULL );nvif_client_fini (&cli->base);usif_client_fini (cli); +kfree (cli); } static void
Signature · 1 line
2.1.2
Quoted 19 lines · Thierry Reding
From: Thierry Reding <[email protected]>
The memory allocated for a
nouveau_cliobject innouveau_cli_create()is never freed. Free the memory innouveau_cli_destroy()to plug this leak.kmemleak recorded this after running a couple of nouveau test programs. Note that kmemleak points at
drm_open_helper()because for some reason it thinks that skipping the first two stack frames is a good idea.Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nouveau_drm.c +0
-0
drivers/gpu/drm/nouveau/nouveau_drm.c nouveau_cli_destroy(struct nouveau_cli *cli) · line 132
Quoted 7 lines
drivers/gpu/drm/nouveau/nouveau_drm.c +1
-0@@ -126,6 +126,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli)nouveau_vm_ref (NULL , &nvkm_client (&cli->base)->vm,NULL );nvif_client_fini (&cli->base);usif_client_fini (cli); +kfree (cli); } static void
Ben, any chance you could pick this up?
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 26 lines · Thierry Reding
Quoted 25 lines · Thierry Reding
From: Thierry Reding <[email protected]>
The memory allocated for a
nouveau_cliobject innouveau_cli_create()is never freed. Free the memory innouveau_cli_destroy()to plug this leak.kmemleak recorded this after running a couple of nouveau test programs. Note that kmemleak points at
drm_open_helper()because for some reason it thinks that skipping the first two stack frames is a good idea.Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nouveau_drm.c +1
-0@@ -126,6 +126,7 @@ nouveau_cli_destroy(struct nouveau_cli *cli)nouveau_vm_ref (NULL , &nvkm_client (&cli->base)->vm,NULL );nvif_client_fini (&cli->base);usif_client_fini (cli); +kfree (cli); }
Quoted 3 lines
drivers/gpu/drm/nouveau/nouveau_drm.c nouveau_cli_destroy(struct nouveau_cli *cli) · line 132
Quoted 1 line
drivers/gpu/drm/nouveau/nouveau_drm.c +0
-0static voidBen, any chance you could pick this up?
Got it :) Thanks for the ping!
Ben.
Quoted 8 lines
Thierry
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau