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]
Date: Tue, 16 Jan 2024 12:09:26 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Su Hui <suhui@...china.com>
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 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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ