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: <87tsvg7x32.ritesh.list@gmail.com>
Date: Tue, 17 Feb 2026 11:03:53 +0530
From: Ritesh Harjani (IBM) <ritesh.list@...il.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>, linux-ext4@...r.kernel.org, Theodore Ts'o <tytso@....edu>
Cc: Dan Carpenter <dan.carpenter@...aro.org>
Subject: Re: [PATCH] ext4: Minor fix for ext4_split_extent_zeroout()

Ojaswin Mujoo <ojaswin@...ux.ibm.com> writes:

> We missed storing the error which triggerd smatch warning:
>
> 	fs/ext4/extents.c:3369 ext4_split_extent_zeroout()
> 	warn: duplicate zero check 'err' (previous on line 3363)
>
> fs/ext4/extents.c
>     3361
>     3362         err = ext4_ext_get_access(handle, inode, path + depth);
>     3363         if (err)
>     3364                 return err;
>     3365
>     3366         ext4_ext_mark_initialized(ex);
>     3367
>     3368         ext4_ext_dirty(handle, inode, path + depth);
> --> 3369         if (err)
>     3370                 return err;
>     3371
>     3372         return 0;
>     3373 }
>
> Fix it by correctly storing the err value from ext4_ext_dirty().
>


Looks straight forward.


> Link: https://lore.kernel.org/all/aYXvVgPnKltX79KE@stanley.mountain/
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Signed-off-by: Ojaswin Mujoo <ojaswin@...ux.ibm.com>

Fixes: a985e07c26455 ("ext4: refactor zeroout path and handle all cases")

Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@...il.com>


> ---
>  fs/ext4/extents.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 3630b27e4fd7..5579e0e68c0f 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3365,7 +3365,7 @@ static int ext4_split_extent_zeroout(handle_t *handle, struct inode *inode,
>  
>  	ext4_ext_mark_initialized(ex);
>  
> -	ext4_ext_dirty(handle, inode, path + depth);
> +	err = ext4_ext_dirty(handle, inode, path + depth);
>  	if (err)
>  		return err;
>  
> -- 
> 2.52.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ