lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d24b79d3-9a15-4b64-91d0-dfddaa6f5e42@intel.com>
Date: Fri, 13 Jun 2025 11:01:32 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Shaopeng Tan <tan.shaopeng@...fujitsu.com>, <x86@...nel.org>,
	<linux-kernel@...r.kernel.org>
CC: James Morse <james.morse@....com>, Yury Norov <yury.norov@...il.com>,
	"Dave Martin" <dave.martin@....com>, <fenghuay@...dia.com>,
	<peternewman@...gle.com>, Babu Moger <Babu.Moger@....com>, Borislav Petkov
	<bp@...en8.de>, <shameerali.kolothum.thodi@...wei.com>,
	<bobo.shaobowang@...wei.com>, D Scott Phillips OS
	<scott@...amperecomputing.com>, <carl@...amperecomputing.com>, Koba Ko
	<kobak@...dia.com>, Shanker Donthineni <sdonthineni@...dia.com>, Xin Hao
	<xhao@...ux.alibaba.com>, <baolin.wang@...ux.alibaba.com>,
	<lcherian@...vell.com>, <amitsinght@...vell.com>, Ingo Molnar
	<mingo@...hat.com>, David Hildenbrand <david@...hat.com>, H Peter Anvin
	<hpa@...or.com>, Rex Nie <rex.nie@...uarmicro.com>, Jamie Iles
	<quic_jiles@...cinc.com>, <dfustini@...libre.com>, Thomas Gleixner
	<tglx@...utronix.de>
Subject: Re: [PATCH] fs/resctrl: Optimize code in rdt_get_tree()

Hi Shaopeng,

On 6/13/25 12:37 AM, Shaopeng Tan wrote:
> schemata_list_destroy() has to be called if schemata_list_create() fails.
> 
> rdt_get_tree() calls schemata_list_destroy() in two different ways: 
> directly if schemata_list_create() itself fails and 
> on the exit path via the out_schemata_free goto label.
> 
> Remove schemata_list_destroy() call on schemata_list_create() failure.
> Use existing out_schemata_free goto label instead.
> 
> Signed-off-by: Shaopeng Tan <tan.shaopeng@...fujitsu.com>
> ---
>  fs/resctrl/rdtgroup.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
> index 1beb124e25f6..592d4f69fce9 100644
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -2608,10 +2608,8 @@ static int rdt_get_tree(struct fs_context *fc)
>  		goto out_root;
>  
>  	ret = schemata_list_create();
> -	if (ret) {
> -		schemata_list_destroy();
> -		goto out_ctx;
> -	}
> +	if (ret)
> +		goto out_schemata_free;
>  
>  	ret = closid_init();
>  	if (ret)
> @@ -2683,7 +2681,6 @@ static int rdt_get_tree(struct fs_context *fc)
>  	closid_exit();
>  out_schemata_free:
>  	schemata_list_destroy();
> -out_ctx:
>  	rdt_disable_ctx();
>  out_root:
>  	rdtgroup_destroy_root();

Could you please resubmit this independently? That is, not in an
email thread with the cpumask patch?

With that:
| Reviewed-by: Reinette Chatre <reinette.chatre@...el.com>

Thank you very much.

Reinette


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ