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: <20230511232206.GG858799@frogsfrogsfrogs>
Date:   Thu, 11 May 2023 16:22:06 -0700
From:   "Darrick J. Wong" <djwong@...nel.org>
To:     renlei1@...natelecom.cn
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xfs: xfs_nfs_get_inode support zero generation

On Thu, May 11, 2023 at 06:17:21PM +0800, renlei1@...natelecom.cn wrote:
> From: Ren Lei <renlei1@...natelecom.cn>
> 
> If generation is zero, bypass the verification of generation number
> to avoid stale file error. (Be consistent with other fs, such as
> ext4, fat, jfs, etc.)

What code is affected by the gen==0 handles being rejected?  Is there a
user program or test case where this is required?

--D

> Signed-off-by: Ren Lei<renlei1@...natelecom.cn>
> ---
>  fs/xfs/xfs_export.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
> index 1064c2342876..cbee32c5ad37 100644
> --- a/fs/xfs/xfs_export.c
> +++ b/fs/xfs/xfs_export.c
> @@ -146,7 +146,7 @@ xfs_nfs_get_inode(
>  		return ERR_PTR(error);
>  	}
>  
> -	if (VFS_I(ip)->i_generation != generation) {
> +	if (generation && VFS_I(ip)->i_generation != generation) {
>  		xfs_irele(ip);
>  		return ERR_PTR(-ESTALE);
>  	}
> -- 
> 2.27.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ