linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Wang, Xiaolei" <Xiaolei.Wang@windriver.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	David Lechner <david@lechnology.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Julia Lawall <julia.lawall@lip6.fr>
Subject: RE: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev
Date: Wed, 30 Dec 2020 12:37:35 +0000	[thread overview]
Message-ID: <PH0PR11MB507731B129639CED3B8C753595D70@PH0PR11MB5077.namprd11.prod.outlook.com> (raw)
In-Reply-To: <d463ff8b-306d-6f40-9115-1595d69edc95@web.de>

Hi Markus

> Thank you very much, very good suggestion,

> Thanks for another positive feedback.


> do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

> Please convince the involved contributors to integrate a corrected patch version.

Do you mean that I should correct the original patch and explain my changes and send it out?

> * Better indentation.

* …
>> +		if (!map->debugfs_name)
>> +			kfree(map->debugfs_name);

>  Would this questionable null pointer check result in a memory leak?

if (!map->debugfs_name)
	kfree(map->debugfs_name);

This null pointer check is not in the memory leak

Thanks
xiaolei
-----Original Message-----
From: Markus Elfring <Markus.Elfring@web.de> 
Sent: Wednesday, December 30, 2020 8:02 PM
To: Wang, Xiaolei <Xiaolei.Wang@windriver.com>; kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org; David Lechner <david@lechnology.com>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Mark Brown <broonie@kernel.org>; Rafael J. Wysocki <rafael@kernel.org>; Julia Lawall <julia.lawall@lip6.fr>
Subject: Re: [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev

> Thank you very much, very good suggestion,

Thanks for another positive feedback.


> do I need to re-send a patch to fix this problem, or modify the previous patch and send it again?

Please convince the involved contributors to integrate a corrected patch version.

* Better indentation.

* …
>> +		if (!map->debugfs_name)
>> +			kfree(map->debugfs_name);

  Would this questionable null pointer check result in a memory leak?

Regards,
Markus

  parent reply	other threads:[~2020-12-30 12:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 10:50 [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Xiaolei Wang
2020-12-29 14:32 ` Mark Brown
     [not found] ` <d516efdd-7e66-13fe-3798-cdea5ff012dc@web.de>
2020-12-30 10:14   ` Wang, Xiaolei
     [not found]     ` <d463ff8b-306d-6f40-9115-1595d69edc95@web.de>
2020-12-30 12:37       ` Wang, Xiaolei [this message]
     [not found]         ` <932c5921-9ad3-e37b-5f31-4de69fa0ca8b@web.de>
     [not found]           ` <81f33869-32f6-650f-0f06-e2a5dce57236@web.de>
2021-01-04 14:17             ` [PATCH 1/2] regmap: debugfs: Delete a misplaced pointer check in regmap_debugfs_init() Greg Kroah-Hartman
     [not found]     ` <1503f5fa-1ad6-7675-6e02-6dc1eb04c1de@web.de>
2020-12-30 12:50       ` [PATCH v3] regmap: debugfs: Fix a memory leak when calling regmap_attach_dev Greg Kroah-Hartman
2020-12-30 13:39     ` Mark Brown

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=PH0PR11MB507731B129639CED3B8C753595D70@PH0PR11MB5077.namprd11.prod.outlook.com \
    --to=xiaolei.wang@windriver.com \
    --cc=Markus.Elfring@web.de \
    --cc=broonie@kernel.org \
    --cc=david@lechnology.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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).