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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84d1cae3-1939-463c-b1f9-344e02f87a9c@huaweicloud.com>
Date: Sat, 27 Jul 2024 14:42:50 +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 12/20] ext4: get rid of ppath in ext4_split_extent_at()

On 2024/7/25 19:07, Jan Kara wrote:
> On Wed 10-07-24 12:06:46, 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.
>>
>> To get rid of the ppath in ext4_split_extent_at(), the following is done
>> here:
>>
>>   * Free the extents path when an error is encountered.
>>   * Its caller needs to update ppath if it uses ppath.
>>   * Teach ext4_ext_show_leaf() to skip error pointer.
>>   * Propagate ext4_find_extent() error return value in ext4_insert_range().
>>
>> No functional changes.
>>
>> Signed-off-by: Baokun Li <libaokun1@...wei.com>
> One nit below:
>
>> @@ -5596,6 +5606,7 @@ static int ext4_insert_range(struct file *file, loff_t offset, loff_t len)
>>   	path = ext4_find_extent(inode, offset_lblk, NULL, 0);
>>   	if (IS_ERR(path)) {
>>   		up_write(&EXT4_I(inode)->i_data_sem);
>> +		ret = PTR_ERR(path);
>>   		goto out_stop;
>>   	}
> AFAICT this actually fixes a bug where we could have returned 0 although
> ext4_find_extent() spotted an error?
Yeah, exactly.
> This would deserve a separate patch so
> that it could be easily pulled into stable.
>
> Otherwise looks good. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@...e.cz>
>
> 								Honza
Ok, I'll put this in a separate patch in the next version.

Thank you very much for your review!

-- 
With Best Regards,
Baokun Li


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ