From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: Nirmoy Das <nirmoy.aiemd@gmail.com>,
"Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "airlied@linux.ie" <airlied@linux.ie>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Das, Nirmoy" <Nirmoy.Das@amd.com>
Subject: Re: [PATCH] drm/amdgpu: fix memory leak
Date: Fri, 4 Oct 2019 10:44:04 +0000 [thread overview]
Message-ID: <62ea397d-2847-04d7-3c50-6292255845c5@amd.com> (raw)
In-Reply-To: <20191004101746.19574-1-nirmoy.das@amd.com>
First of all please send mails regarding amdgpu to the amd-gfx mailing
list and not lkml/dri-devel.
Am 04.10.19 um 12:17 schrieb Nirmoy Das:
> In amdgpu_bo_list_ioctl when idr_alloc fails
> don't return without freeing bo list entry.
>
> Fixes: 964d0fbf6301d ("drm/amdgpu: Allow to create BO lists in CS ioctl v3")
>
> Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
> index 7bcf86c61999..c3e5ea544857 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
> @@ -284,7 +284,7 @@ int amdgpu_bo_list_ioctl(struct drm_device *dev, void *data,
> mutex_unlock(&fpriv->bo_list_lock);
> if (r < 0) {
> amdgpu_bo_list_put(list);
> - return r;
> + goto error_free;
NAK, that is a double free. The bo list entries are freed by
amdgpu_bo_list_put().
Regards,
Christian.
> }
>
> handle = r;
next prev parent reply other threads:[~2019-10-04 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 10:17 Nirmoy Das
2019-10-04 10:44 ` Koenig, Christian [this message]
2019-10-04 11:00 ` Nirmoy
2019-10-04 11:13 ` Koenig, Christian
2019-10-04 11:26 ` Nirmoy
2019-10-04 11:30 ` Koenig, Christian
2019-10-04 11:36 ` Nirmoy
-- strict thread matches above, loose matches on Subject: below --
2015-09-18 8:46 Sudip Mukherjee
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=62ea397d-2847-04d7-3c50-6292255845c5@amd.com \
--to=christian.koenig@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Nirmoy.Das@amd.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nirmoy.aiemd@gmail.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®