linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Navid Emamdoost <navid.emamdoost@gmail.com>,
	dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	Navid Emamdoost <emamd001@umn.edu>, Kangjie Lu <kjlu@umn.edu>,
	Stephen McCamant <smccaman@umn.edu>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Eric Anholt <eric@anholt.net>,
	Iago Toral Quiroga <itoral@igalia.com>
Subject: Re: [PATCH] drm/v3d: Fix memory leak in v3d_submit_cl_ioctl
Date: Tue, 22 Oct 2019 09:30:34 +0200	[thread overview]
Message-ID: <f5c228b6-eb9b-445d-3055-bb966e1c5deb@web.de> (raw)
In-Reply-To: <a28f12a8-49c4-30f0-cc86-6a41ded96ab2@web.de>

> …
>> +++ b/drivers/gpu/drm/v3d/v3d_gem.c
>> @@ -557,13 +557,16 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,
> …
>>  		if (ret) {
>>  			v3d_job_put(&render->base);
>> +			kfree(bin);
> …
>
> Can it be helpful to move the added function call before the other
> in this if branch (if you prefer to avoid the addition of a jump target here)?

I got into the mood to take another look at these implementation details.
I suggest then to look at the commit 0d352a3a8a1f26168d09f7073e61bb4b328e3bb9
("drm/v3d: don't leak bin job if v3d_job_init fails." from 2019-09-18)
once more.

With which software versions did you perform your source code analysis?

Regards,
Markus

  reply	other threads:[~2019-10-22  7:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21 18:52 [PATCH] drm/v3d: Fix memory leak in v3d_submit_cl_ioctl Navid Emamdoost
2019-10-21 20:40 ` Markus Elfring
2019-10-22  7:30   ` Markus Elfring [this message]
2019-10-22  9:36 ` Daniel Vetter
2019-10-23  3:53   ` Navid Emamdoost
2019-10-23  9:16     ` Daniel Vetter
2019-10-23 18:59       ` Daniel Vetter

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=f5c228b6-eb9b-445d-3055-bb966e1c5deb@web.de \
    --to=markus.elfring@web.de \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emamd001@umn.edu \
    --cc=eric@anholt.net \
    --cc=itoral@igalia.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kjlu@umn.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=navid.emamdoost@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).