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]
Message-ID: <1847a959-b8a1-29e9-c87e-036709586d1a@nfschina.com>
Date: Wed, 17 Jan 2024 09:23:01 +0800
From: Su Hui <suhui@...china.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: mark@...heh.com, jlbec@...lplan.org, joseph.qi@...ux.alibaba.com,
 nathan@...nel.org, ndesaulniers@...gle.com, morbo@...gle.com,
 justinstitt@...gle.com, ocfs2-devel@...ts.linux.dev,
 linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] ocfs2: remove useless code in ocfs2_try_to_merge_extent

On 2024/1/17 04:09, Andrew Morton wrote:
> On Fri, 12 Jan 2024 12:26:40 +0800 Su Hui <suhui@...china.com> wrote:
>
>> Clang static checker warning: Value stored to 'rec' is never read.
>> Remove this useless code to silent this warning.
>>
>> --- a/fs/ocfs2/alloc.c
>> +++ b/fs/ocfs2/alloc.c
>> @@ -3743,8 +3743,6 @@ static int ocfs2_try_to_merge_extent(handle_t *handle,
>>   			goto out;
>>   		}
>>   
>> -		rec = &el->l_recs[split_index];
>> -
>>   		/*
>>   		 * Note that we don't pass split_rec here on purpose -
>>   		 * we've merged it into the rec already.
> Then:
>
> 		ret = ocfs2_merge_rec_left(path, handle, et, rec,
> 					   dealloc, split_index);
>
> and ocfs2_merge_rec_left() almost immediately dereferences `rec'.
>
> So this looks quite wrong to me.
>
Oh, really sorry for the noise.
This patch is wrong.

Su Hui


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ