From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Navid Emamdoost <navid.emamdoost@gmail.com>
Cc: "emamd001@umn.edu" <emamd001@umn.edu>,
"smccaman@umn.edu" <smccaman@umn.edu>,
"kjlu@umn.edu" <kjlu@umn.edu>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>,
"Zhou, David(ChunMing)" <David1.Zhou@amd.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
Sam Ravnborg <sam@ravnborg.org>, Rex Zhu <Rex.Zhu@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/amdgpu: release allocated memory
Date: Sat, 21 Sep 2019 11:32:33 +0000 [thread overview]
Message-ID: <06d1d086-0628-829b-766f-e1f614fab909@amd.com> (raw)
In-Reply-To: <20190920224915.2788-1-navid.emamdoost@gmail.com>
Am 21.09.19 um 00:49 schrieb Navid Emamdoost:
> In amdgpu_vmid_grab_idle, fences is being leaked in one execution path.
> The missing kfree was added.
NAK, the array is freed by the dma_fence_array. This is a double free.
Regards,
Christian.
>
> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> index 57b3d8a9bef3..9063cd36fa94 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c
> @@ -244,6 +244,7 @@ static int amdgpu_vmid_grab_idle(struct amdgpu_vm *vm,
> r = amdgpu_sync_fence(adev, sync, &array->base, false);
> dma_fence_put(ring->vmid_wait);
> ring->vmid_wait = &array->base;
> + kfree(fences);
> return r;
> }
> kfree(fences);
prev parent reply other threads:[~2019-09-21 11:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 22:49 Navid Emamdoost
2019-09-21 11:32 ` Koenig, Christian [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06d1d086-0628-829b-766f-e1f614fab909@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=David1.Zhou@amd.com \
--cc=Rex.Zhu@amd.com \
--cc=airlied@linux.ie \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=emamd001@umn.edu \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=navid.emamdoost@gmail.com \
--cc=sam@ravnborg.org \
--cc=smccaman@umn.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®