[<prev] [next>] [day] [month] [year] [list]
Message-ID: <PH0PR11MB50770B63B8BFB8B7DAD615C195D90@PH0PR11MB5077.namprd11.prod.outlook.com>
Date: Mon, 28 Dec 2020 02:26:33 +0000
From: "Wang, Xiaolei" <Xiaolei.Wang@...driver.com>
To: Markus Elfring <Markus.Elfring@....de>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mark Brown <broonie@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Subject: RE: regmap: debugfs: fix a memory leak when calling regmap_attach_dev
> Do you mean so?
>
> commit:
> 9b947a13e7f6 ("regmap: use debugfs even when no device")
> Please take another look at known information sources.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=f838f8d2b694cf9d524dc4423e9dd2db13892f3f#n89
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=f838f8d2b694cf9d524dc4423e9dd2db13892f3f#n121
> Which one do you mean by "another null point"?
How do you think about to check if calls of the function “kasprintf” succeeded here?
https://elixir.bootlin.com/linux/v5.10.3/source/lib/kasprintf.c#L53
Will any more exception handling become relevant also for the implementation of the function “regmap_debugfs_init”?
-----Original Message-----
From: Markus Elfring <Markus.Elfring@....de>
Sent: Sunday, December 27, 2020 9:40 PM
To: Wang, Xiaolei <Xiaolei.Wang@...driver.com>; kernel-janitors@...r.kernel.org
Cc: linux-kernel@...r.kernel.org; Greg Kroah-Hartman <gregkh@...uxfoundation.org>; Mark Brown <broonie@...nel.org>; Rafael J. Wysocki <rafael@...nel.org>
Subject: Re: regmap: debugfs: fix a memory leak when calling regmap_attach_dev
> Do you mean so?
>
> commit:
> 9b947a13e7f6 ("regmap: use debugfs even when no device")
> Please take another look at known information sources.
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=f838f8d2b694cf9d524dc4423e9dd2db13892f3f#n89
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=f838f8d2b694cf9d524dc4423e9dd2db13892f3f#n121
> Which one do you mean by "another null point"?
> How do you think about to check if calls of the function “kasprintf” succeeded here?
> https://elixir.bootlin.com/linux/v5.10.3/source/lib/kasprintf.c#L53
> Will any more exception handling become relevant also for the implementation of the function “regmap_debugfs_init”?
Thanks for your suggestion, I will modify the commit log and add another null point check together with corresponding exception handling
Regards,
Xiaolei
Powered by blists - more mailing lists