lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_M5DkENRbE5nnnxucVN5O6tPMO_G2xLyEGotx8LSFBuOQ@mail.gmail.com>
Date:	Fri, 18 Mar 2016 15:16:28 -0400
From:	Alex Deucher <alexdeucher@...il.com>
To:	Colin King <colin.king@...onical.com>
Cc:	Alex Deucher <alexander.deucher@....com>,
	Christian König <christian.koenig@....com>,
	Dave Airlie <airlied@...hat.com>,
	Tom St Denis <tom.stdenis@....com>,
	Rex Zhu <Rex.Zhu@....com>, Jammy Zhou <Jammy.Zhou@....com>,
	Ken Wang <Qingqing.Wang@....com>,
	yanyang1 <young.yang@....com>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/amd/powerplay: fix memory leak of tdp_table

On Fri, Mar 18, 2016 at 12:47 PM, Colin King <colin.king@...onical.com> wrote:
> From: Colin Ian King <colin.king@...onical.com>
>
> tdp_table is being leaked on failed allocations of
> hwmgr->dyn_state.cac_dtp_table. kfree tdp_table on the error
> return path to fix the leak.
>
> Signed-off-by: Colin Ian King <colin.king@...onical.com>

Applied,  thanks!

Alex


> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> index 34f4bef..b156481 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c
> @@ -512,8 +512,10 @@ static int get_cac_tdp_table(
>
>         hwmgr->dyn_state.cac_dtp_table = kzalloc(table_size, GFP_KERNEL);
>
> -       if (NULL == hwmgr->dyn_state.cac_dtp_table)
> +       if (NULL == hwmgr->dyn_state.cac_dtp_table) {
> +               kfree(tdp_table);
>                 return -ENOMEM;
> +       }
>
>         memset(hwmgr->dyn_state.cac_dtp_table, 0x00, table_size);
>
> --
> 2.7.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ