Re: [PATCH] regmap: Properly free allocated name for regmap_config of syscon

2020-11-11 Thread Kefeng Wang
On 2020/11/10 16:47, Marc Zyngier wrote: On 2020-11-10 01:35, Kefeng Wang wrote: On 2020/11/10 1:23, Mark Brown wrote: On Mon, Nov 09, 2020 at 07:58:16PM +0800, Kefeng Wang wrote: Hi Marc,  the regmap debugfs will duplicate a name in regmap_set_name(), and syscon_config.name won't be

Re: [PATCH] regmap: Properly free allocated name for regmap_config of syscon

2020-11-10 Thread Marc Zyngier
On 2020-11-10 01:35, Kefeng Wang wrote: On 2020/11/10 1:23, Mark Brown wrote: On Mon, Nov 09, 2020 at 07:58:16PM +0800, Kefeng Wang wrote: syscon_config.name in of_syscon_register is allocated using kasprintf, which should be freed when it is not used after regmap_set_name, fix the following

Re: [PATCH] regmap: Properly free allocated name for regmap_config of syscon

2020-11-09 Thread Kefeng Wang
On 2020/11/10 1:23, Mark Brown wrote: On Mon, Nov 09, 2020 at 07:58:16PM +0800, Kefeng Wang wrote: syscon_config.name in of_syscon_register is allocated using kasprintf, which should be freed when it is not used after regmap_set_name, fix the following memory leak. unreferenced object

Re: [PATCH] regmap: Properly free allocated name for regmap_config of syscon

2020-11-09 Thread Mark Brown
On Mon, Nov 09, 2020 at 07:58:16PM +0800, Kefeng Wang wrote: > syscon_config.name in of_syscon_register is allocated using kasprintf, > which should be freed when it is not used after regmap_set_name, fix > the following memory leak. > unreferenced object 0xffe07fe8c150 (size 16): > comm

[PATCH] regmap: Properly free allocated name for regmap_config of syscon

2020-11-09 Thread Kefeng Wang
syscon_config.name in of_syscon_register is allocated using kasprintf, which should be freed when it is not used after regmap_set_name, fix the following memory leak. unreferenced object 0xffe07fe8c150 (size 16): comm "swapper/0", pid 1, jiffies 4294892540 (age 68.168s) hex dump (first 16