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] [day] [month] [year] [list]
Date:   Fri, 17 Feb 2023 15:19:07 +0800
From:   Kemeng Shi <shikemeng@...weicloud.com>
To:     "Ritesh Harjani (IBM)" <ritesh.list@...il.com>, tytso@....edu,
        adilger.kernel@...ger.ca, jack@...e.cz
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/21] ext4: get correct ext4_group_info in
 ext4_mb_prefetch_fini



on 2/17/2023 2:46 PM, Ritesh Harjani (IBM) wrote:
> Kemeng Shi <shikemeng@...weicloud.com> writes:
> 
>> We always get ext4_group_desc with group + 1 and ext4_group_info with
>> group to check if we need do initialize ext4_group_info for the group.
>> Just get ext4_group_desc with group for ext4_group_info initialization
>> check.
>>
>> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
>> ---
>>  fs/ext4/mballoc.c | 6 +++---
>>  1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
>> index 352ac9139fee..f24f80ecf318 100644
>> --- a/fs/ext4/mballoc.c
>> +++ b/fs/ext4/mballoc.c
>> @@ -2570,13 +2570,13 @@ void ext4_mb_prefetch_fini(struct super_block *sb, ext4_group_t group,
>>  			   unsigned int nr)
>>  {
>>  	while (nr-- > 0) {
>> -		struct ext4_group_desc *gdp = ext4_get_group_desc(sb, group,
>> -								  NULL);
>> -		struct ext4_group_info *grp = ext4_get_group_info(sb, group);
>> +		struct ext4_group_desc *gdp;
>> +		struct ext4_group_info *grp;
> 
> We can even declare these variables at the begining of the function like
> in [1]. Also I would advise to rearrange any "fixes" patches at the
> begining of the patch series and "cleanup" patches at the end.
> e.g. this looks like a fix to me.
> 
> That way it is sometimes easier for people to cherry-pick any fixes if
> required in their older kernel trees. ;)
> 
Hi Ritesh, Thanks for feedback. I declare these variables at the begining
of the function in next version.
I agree that we should keep bugfix patches at the beginning. Actually,
patch 1-8 are all fix patches from my view. So I think current patch sort
is fine.
Thanks.

-- 
Best wishes
Kemeng Shi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ