[PATCH 4/4] amdkfd: Fix possible dangling ptr in kfd_dbgmgr_destroy()

Oded Gabbay oded.gabbay at gmail.com
Mon Sep 5 11:01:23 UTC 2016


On Sat, Sep 3, 2016 at 5:49 AM, Edward O'Callaghan
<funfunctor at folklore1984.net> wrote:
> Signed-off-by: Edward O'Callaghan <funfunctor at folklore1984.net>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c b/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
> index 56d6763..8a26d5a 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_dbgmgr.c
> @@ -58,6 +58,7 @@ void kfd_dbgmgr_destroy(struct kfd_dbgmgr *pmgr)
>         if (pmgr != NULL) {
>                 kfd_dbgmgr_uninitialize(pmgr);
>                 kfree(pmgr);
> +               pmgr = NULL;
pmgr is passed as argument to function. There is no point of setting it to NULL.

Oded

>         }
>  }
>
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list