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: <bhtrj5dw6h6psi25c2ulbsqrsnrfrghvjxoiifeg3efnhirto7@hqhxxyhkd7hl>
Date: Tue, 2 Dec 2025 11:24:12 +0100
From: Jan Kara <jack@...e.cz>
To: Jori Koolstra <jkoolstra@...all.nl>
Cc: Jan Kara <jack@...e.cz>, Christian Brauner <brauner@...nel.org>, 
	Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>, Shuah Khan <skhan@...uxfoundation.org>, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] Corrected errno in minix_new_inode

On Mon 01-12-25 13:23:38, Jori Koolstra wrote:
> The cases (!j || j > sbi->s_ninodes) can never occur unless the
> filesystem is broken, so this should not return ENOSPC, but
> EFSCORRUPTED.
> 
> Signed-off-by: Jori Koolstra <jkoolstra@...all.nl>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
> Changes in v2:
>  - added unnecessary variable assignment back in the spirit of
>    defensive programming after feedback from Jan Kara:
>    https://lkml.org/lkml/2025/11/24/1278
> ---
>  fs/minix/bitmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c
> index 7da66ca184f4..abec438330a7 100644
> --- a/fs/minix/bitmap.c
> +++ b/fs/minix/bitmap.c
> @@ -247,7 +247,7 @@ struct inode *minix_new_inode(const struct inode *dir, umode_t mode)
>  	j += i * bits_per_zone;
>  	if (!j || j > sbi->s_ninodes) {
>  		iput(inode);
> -		return ERR_PTR(-ENOSPC);
> +		return ERR_PTR(-EFSCORRUPTED);
>  	}
>  	inode_init_owner(&nop_mnt_idmap, inode, dir, mode);
>  	inode->i_ino = j;
> -- 
> 2.51.2
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ