drm/nouveau/secboot/acr: fix memory leak
Subsystems (3)
PATCH 1/1 drm/nouveau/secboot/acr: fix memory leak
In case memory resources for *bl_desc* were allocated, release them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +1 -0
@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, bl = acr->hsbl_unload_blob; }else {nvkm_error (_acr->subdev,"invalid secure boot blob!\n" ); +kfree (bl_desc);return -EINVAL ; }
Signature · 1 line
2.7.4
Hi all,
Friendly ping! Who can take this?
Thanks
--
Gustavo
Quoted 23 lines · Gustavo A. R. Silva
In case memory resources for *bl_desc* were allocated, release them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 + 1 file changed, 1 insertion(+)drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +1
-0@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, bl = acr->hsbl_unload_blob; }else {nvkm_error (_acr->subdev,"invalid secure boot blob!\n" ); +kfree (bl_desc);return -EINVAL ; }
John Hubbard
Reviewed-byQuoted 19 lines · Gustavo A. R. Silva
Hi all,
Friendly ping! Who can take this?
Thanks
--
GustavoQuoted 10 lines · Gustavo A. R. Silva
In case memory resources for *bl_desc* were allocated, release them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 + 1 file changed, 1 insertion(+)
Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, · line 807
Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +1
-0@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, bl = acr->hsbl_unload_blob; }else {nvkm_error (_acr->subdev,"invalid secure boot blob!\n" ); +kfree (bl_desc);return -EINVAL ; }
Hi Gustavo,
Seeing as how I've been working on this corner of Nouveau lately (don't ask, haha), I reviewed and also tested this. It looks good, you can add:
thanks,
Signature · 6 lines
John Hubbard NVIDIA _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Kees Cook
Reviewed-byQuoted 36 lines · John Hubbard
Quoted 19 lines · Gustavo A. R. Silva
Hi all,
Friendly ping! Who can take this?
Thanks
--
GustavoQuoted 10 lines · Gustavo A. R. Silva
In case memory resources for *bl_desc* were allocated, release them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 + 1 file changed, 1 insertion(+)Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, · line 807
Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +1
-0@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, bl = acr->hsbl_unload_blob; }else {nvkm_error (_acr->subdev,"invalid secure boot blob!\n" ); +kfree (bl_desc);return -EINVAL ; }Hi Gustavo,
Quoted 4 lines
Seeing as how I've been working on this corner of Nouveau lately (don't ask, haha), I reviewed and also tested this. It looks good, you can add:
Reviewed-by John Hubbard <[email protected]>
Ben can you take this?
-Kees
Signature · 6 lines
Kees Cook Pixel Security _______________________________________________ Nouveau mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/nouveau
Quoted 38 lines · Kees Cook
Quoted 36 lines · John Hubbard
Quoted 19 lines · Gustavo A. R. Silva
Hi all,
Friendly ping! Who can take this?
Thanks
--
GustavoQuoted 10 lines · Gustavo A. R. Silva
In case memory resources for *bl_desc* were allocated, release them before return.
Addresses-Coverity-ID: 1472021 ("Resource leak")
Fixes 0d466901552a ("drm/nouveau/secboot/acr: Remove VLA usage")Signed-off-by Gustavo A. R. Silva <[email protected]>--- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c | 1 + 1 file changed, 1 insertion(+)Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, · line 807
Quoted 13 lines
drivers/gpu/drm/nouveau/nvkm/subdev/secboot/acr_r352.c +1
-0@@ -801,6 +801,7 @@ acr_r352_load(struct nvkm_acr *_acr, struct nvkm_falcon *falcon, bl = acr->hsbl_unload_blob; }else {nvkm_error (_acr->subdev,"invalid secure boot blob!\n" ); +kfree (bl_desc);return -EINVAL ; }Hi Gustavo,
Quoted 8 lines
Quoted 4 lines
Seeing as how I've been working on this corner of Nouveau lately (don't ask, haha), I reviewed and also tested this. It looks good, you can add:
Reviewed-by John Hubbard <[email protected]>Ben can you take this?
Reviewed-by Kees Cook <[email protected]>
I've got it in my tree. Thanks!
Quoted 10 lines
-Kees
--
Kees Cook
Pixel Security
_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau