kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Bernard Zhao <bernard@vivo.com>,
	opensource.kernel@vivo.com, amd-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Cc: "David Airlie" <airlied@linux.ie>,
	"Felix Kühling" <Felix.Kuehling@amd.com>,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH v2] drm/amdkfd: Fix memory leaks according to error branches
Date: Sat, 20 Jun 2020 09:20:24 +0000	[thread overview]
Message-ID: <0e76e678-94b1-8f69-d52c-2b67608d5ef8@web.de> (raw)

> The function kobject_init_and_add alloc memory like:
> kobject_init_and_add->kobject_add_varg->kobject_set_name_vargs
> ->kvasprintf_const->kstrdup_const->kstrdup->kmalloc_track_caller
> ->kmalloc_slab, in err branch this memory not free. If use
> kmemleak, this path maybe catched.
> These changes are to add kobject_put in kobject_init_and_add
> failed branch, fix potential memleak.

I suggest to improve this change description.

* Can an other wording variant be nicer?

* Will the tag “Fixes” become helpful for the commit message?

Regards,
Markus

             reply	other threads:[~2020-06-20  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-20  9:20 Markus Elfring [this message]
2020-06-20  9:37 ` [PATCH v2] drm/amdkfd: Fix memory leaks according to error branches Julia Lawall
2020-06-20 11:16   ` =?UTF-8?B?UmU6UmU6IFtQQVRDSCB2Ml0gZHJtL2FtZGtmZDogRml4IG1lbW9yeSBsZWFrcyBhY2NvcmRpbmcgdG8gZXJyb3IgYn Bernard
2020-06-20 11:26     ` Re:Re: [PATCH v2] drm/amdkfd: Fix memory leaks according to error branches Julia Lawall
2020-06-20 12:56   ` Markus Elfring
2020-06-20 16:14   ` [v2] " Markus Elfring

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=0e76e678-94b1-8f69-d52c-2b67608d5ef8@web.de \
    --to=markus.elfring@web.de \
    --cc=Felix.Kuehling@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bernard@vivo.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=opensource.kernel@vivo.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;
as well as URLs for NNTP newsgroup(s).