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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 8 Oct 2015 12:20:04 -0400
From:	Alex Deucher <alexdeucher@...il.com>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	David Airlie <airlied@...ux.ie>,
	Daniel Vetter <daniel.vetter@...ll.ch>,
	LKML <linux-kernel@...r.kernel.org>,
	Maling list - DRI developers 
	<dri-devel@...ts.freedesktop.org>,
	Alex Deucher <alexander.deucher@....com>,
	Christian König <christian.koenig@....com>,
	"monk.liu" <monk.liu@....com>
Subject: Re: [PATCH RESEND 3/3] drm/amdgpu: fix memory leak

On Thu, Oct 8, 2015 at 9:58 AM, Sudip Mukherjee
<sudipm.mukherjee@...il.com> wrote:
> If amdgpu_ib_get() fails we returned the error code but we missed
> freeing ib.
>
> Cc: "Christian König" <christian.koenig@....com>
> Cc: Jammy Zhou <Jammy.Zhou@....com>
> Cc: Chunming Zhou <david1.zhou@....com>
> Cc: Alex Deucher <alexander.deucher@....com>
> Cc: "monk.liu" <monk.liu@....com>
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> ---
>
> Sent on 18/09/2015

I somehow missed this before.  Applied.  Thanks!

Alex

>
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 1e14531..53d551f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -455,8 +455,10 @@ int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
>                 return -ENOMEM;
>
>         r = amdgpu_ib_get(ring, NULL, ndw * 4, ib);
> -       if (r)
> +       if (r) {
> +               kfree(ib);
>                 return r;
> +       }
>         ib->length_dw = 0;
>
>         /* walk over the address space and update the page directory */
> --
> 1.9.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ