public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman•id.au>
To: "wanghai \(M\)" <wanghai38@huawei•com>,
	Markus Elfring <Markus.Elfring@web•de>,
	linuxppc-dev@lists•ozlabs.org
Cc: Andrew Donnellan <ajd@linux•ibm.com>,
	Arnd Bergmann <arnd@arndb•de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	kernel-janitors@vger•kernel.org, linux-kernel@vger•kernel.org,
	Ian Munsie <imunsie@au1•ibm.com>,
	Frederic Barrat <fbarrat@linux•ibm.com>
Subject: Re: [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr()
Date: Wed, 03 Jun 2020 13:02:00 +1000	[thread overview]
Message-ID: <877dwoj1hz.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <25ad528b-beaf-820f-9738-ea304dcbc0d7@huawei.com>

"wanghai (M)" <wanghai38@huawei•com> writes:
> 在 2020/6/3 1:20, Markus Elfring 写道:
>>> Fix it by adding a call to kobject_put() in the error path of
>>> kobject_init_and_add().
>> Thanks for another completion of the exception handling.
>>
>> Would an other patch subject be a bit nicer?
> Thanks for the guidance, I will perfect this description and send a v2
>>
>> …
>>> +++ b/drivers/misc/cxl/sysfs.c
>>> @@ -624,7 +624,7 @@ static struct afu_config_record *cxl_sysfs_afu_new_cr(struct cxl_afu *afu, int c
>>>   	rc = kobject_init_and_add(&cr->kobj, &afu_config_record_type,
>>>   				  &afu->dev.kobj, "cr%i", cr->cr);
>>>   	if (rc)
>>> -		goto err;
>>> +		goto err1;
>> …
>>
>> Can an other label be more reasonable here?
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=f359287765c04711ff54fbd11645271d8e5ff763#n465
> I just used the original author's label, should I replace all his labels 
> like'err','err1' with reasonable one.

No.

cheers

  reply	other threads:[~2020-06-03  3:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-02 17:20 [PATCH] cxl: Fix kobject memory leak in cxl_sysfs_afu_new_cr() Markus Elfring
2020-06-03  1:42 ` wanghai (M)
2020-06-03  3:02   ` Michael Ellerman [this message]
2020-06-03  5:07     ` Markus Elfring
2020-06-03  6:14   ` [PATCH] " Greg Kroah-Hartman
2020-06-03  6:34     ` wanghai (M)
2020-06-03  6:50       ` Greg Kroah-Hartman
2020-06-03  6:54         ` wanghai (M)
2020-06-03  6:56       ` Markus Elfring
2020-06-03  6:48     ` [PATCH] " 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=877dwoj1hz.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman$(echo .)id.au \
    --cc=Markus.Elfring@web$(echo .)de \
    --cc=ajd@linux$(echo .)ibm.com \
    --cc=arnd@arndb$(echo .)de \
    --cc=fbarrat@linux$(echo .)ibm.com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=imunsie@au1$(echo .)ibm.com \
    --cc=kernel-janitors@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=wanghai38@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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