mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Felix Kuehling <felix.kuehling@amd.com>
To: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>
Cc: alexander.deucher@amd.com, christian.koenig@amd.com,
	Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
	sumit.semwal@linaro.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, yusongping@huawei.com,
	hukeping@huawei.com, artem.kuzin@huawei.com
Subject: Re: [PATCH] drm/amdkfd: Fix memory leakage
Date: Mon, 28 Nov 2022 23:13:48 -0500	[thread overview]
Message-ID: <89cac4d9-ed8a-1498-7e30-4a3c87720043@amd.com> (raw)
In-Reply-To: <20221129034734.2141562-1-konstantin.meskhidze@huawei.com>

Am 2022-11-28 um 22:47 schrieb Konstantin Meskhidze:
> This patch fixes potential memory leakage and seg fault
> in  _gpuvm_import_dmabuf() function
>
> Signed-off-by: Konstantin Meskhidze <konstantin.meskhidze@huawei.com>

Thank you for the patch. I'm adding a Fixes tag and pushing the patch to 
amd-staging-drm-next.

Fixes: d4ec4bdc0bd5 ("drm/amdkfd: Allow access for mmapping KFD BOs")
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index 978d3970b5cc..e0084f712e02 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -2257,7 +2257,7 @@ int amdgpu_amdkfd_gpuvm_import_dmabuf(struct amdgpu_device *adev,
>   
>   	ret = drm_vma_node_allow(&obj->vma_node, drm_priv);
>   	if (ret) {
> -		kfree(mem);
> +		kfree(*mem);
>   		return ret;
>   	}
>   

      reply	other threads:[~2022-11-29  4:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  3:47 Konstantin Meskhidze
2022-11-29  4:13 ` Felix Kuehling [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=89cac4d9-ed8a-1498-7e30-4a3c87720043@amd.com \
    --to=felix.kuehling@amd.com \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=artem.kuzin@huawei.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hukeping@huawei.com \
    --cc=konstantin.meskhidze@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=yusongping@huawei.com \
    /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®