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: <e24299f8-d60d-7760-cb33-26598f3dff69@huaweicloud.com>
Date: Tue, 24 Dec 2024 20:10:40 +0800
From: Kemeng Shi <shikemeng@...weicloud.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>
Cc: tytso@....edu, adilger.kernel@...ger.ca, linux-ext4@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/6] ext4: remove unneeded check in get_dx_countlimit



on 12/20/2024 8:51 PM, Ojaswin Mujoo wrote:
> On Thu, Dec 19, 2024 at 07:00:25PM +0800, Kemeng Shi wrote:
>> The "offset" is always non-NULL, remove unneeded NULL check of "offset".
>>
>> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
> 
> Hi Kemeng,
> 
> I know the current callers don't pass NULL but I think we should still
> keep the check around just in case, to avoid NULL dereferences in
> future. I don't think there's any harm in keeping it
> 
Sure, no insistant on this and will drop this in next version.

Thanks,
Kemeng

> Regards,
> ojaswin
> 
>> ---
>>  fs/ext4/namei.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c
>> index 33670cebdedc..07a1bb570deb 100644
>> --- a/fs/ext4/namei.c
>> +++ b/fs/ext4/namei.c
>> @@ -434,8 +434,7 @@ static struct dx_countlimit *get_dx_countlimit(struct inode *inode,
>>  	} else
>>  		return NULL;
>>  
>> -	if (offset)
>> -		*offset = count_offset;
>> +	*offset = count_offset;
>>  	return (struct dx_countlimit *)(((void *)dirent) + count_offset);
>>  }
>>  
>> -- 
>> 2.30.0
>>
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ