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: <0046d3b3-24ce-4cdb-a40a-4022b79a5a7b@huaweicloud.com>
Date: Sat, 27 Jul 2024 14:18:33 +0800
From: Baokun Li <libaokun@...weicloud.com>
To: Jan Kara <jack@...e.cz>
Cc: linux-ext4@...r.kernel.org, tytso@....edu, adilger.kernel@...ger.ca,
 ritesh.list@...il.com, linux-kernel@...r.kernel.org, yi.zhang@...wei.com,
 yangerkun@...wei.com, Baokun Li <libaokun1@...wei.com>,
 Baokun Li <libaokun@...weicloud.com>
Subject: Re: [PATCH 08/20] ext4: get rid of ppath in ext4_find_extent()

On 2024/7/25 18:38, Jan Kara wrote:
> On Wed 10-07-24 12:06:42, libaokun@...weicloud.com wrote:
>> From: Baokun Li <libaokun1@...wei.com>
>>
>> The use of path and ppath is now very confusing, so to make the code more
>> readable, pass path between functions uniformly, and get rid of ppath.
>>
>> Getting rid of ppath in ext4_find_extent() requires its caller to update
>> ppath. These ppaths will also be dropped later. No functional changes.
>>
>> Signed-off-by: Baokun Li <libaokun1@...wei.com>
> One nit below, otherwise feel free to add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
>
>> @@ -3260,11 +3257,12 @@ static int ext4_split_extent_at(handle_t *handle,
>>   	 * WARN_ON may be triggered in ext4_da_update_reserve_space() due to
>>   	 * an incorrect ee_len causing the i_reserved_data_blocks exception.
>>   	 */
>> -	path = ext4_find_extent(inode, ee_block, ppath,
>> +	path = ext4_find_extent(inode, ee_block, *ppath,
>>   				flags | EXT4_EX_NOFAIL);
>>   	if (IS_ERR(path)) {
>>   		EXT4_ERROR_INODE(inode, "Failed split extent on %u, err %ld",
>>   				 split, PTR_ERR(path));
>> +		*ppath = NULL;
>>   		return PTR_ERR(path);
>>   	}
> I think here you forgot to update ppath on success case. It will go away by
> the end of the series but still it's good to keep thing consistent...
>
> 								Honza

Hi Honza,

Thank you for your review!

In patch 5, the ppath is already updated in case of success, so there
is no need to add it here. This update was not shown when the patch
was made and it looks like this:

-       path = ext4_find_extent(inode, ee_block, ppath,
+       path = ext4_find_extent(inode, ee_block, *ppath,
                                 flags | EXT4_EX_NOFAIL);
         if (IS_ERR(path)) {
                 EXT4_ERROR_INODE(inode, "Failed split extent on %u, err 
%ld",
                                  split, PTR_ERR(path));
+               *ppath = NULL;
                 return PTR_ERR(path);
         }
         depth = ext_depth(inode);
         ex = path[depth].p_ext;
         *ppath = path;

-- 
With Best Regards,
Baokun Li


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ