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>] [day] [month] [year] [list]
Date:   Fri, 7 Aug 2020 10:11:23 +0800
From:   Chao Yu <yuchao0@...wei.com>
To:     Liu Song <fishland@...yun.com>, <jaegeuk@...nel.org>,
        <chao@...nel.org>
CC:     <liu.song11@....com.cn>, <linux-kernel@...r.kernel.org>,
        <linux-f2fs-devel@...ts.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: remove unnecessary judgment in
 f2fs_drop_inode

On 2020/8/6 23:03, Liu Song via Linux-f2fs-devel wrote:
> From: Liu Song <liu.song11@....com.cn>
> 
> Inode hash has been removed in "make_bad_inode". If inode_unhashed
> is false, it must not be a bad inode.
> 
> Signed-off-by: Liu Song <liu.song11@....com.cn>
> ---
>   fs/f2fs/super.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 20e56b0fa46a..ee01d15effe3 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -1043,7 +1043,7 @@ static int f2fs_drop_inode(struct inode *inode)
>   	 *       - inode_wait_for_writeback(inode)
>   	 */
>   	if ((!inode_unhashed(inode) && inode->i_state & I_SYNC)) {

Since logic of "bad inode should be removed from hash" is not controlled by
f2fs, so let's add below condition to make sure the rule of vfs is as it is.

f2fs_bug_on(sbi, is_bad_inode(inode));

> -		if (!inode->i_nlink && !is_bad_inode(inode)) {
> +		if (!inode->i_nlink) {
>   			/* to avoid evict_inode call simultaneously */
>   			atomic_inc(&inode->i_count);
>   			spin_unlock(&inode->i_lock);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ