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: <475422C1.2030906@redhat.com>
Date:	Mon, 03 Dec 2007 09:37:37 -0600
From:	Eric Sandeen <sandeen@...hat.com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
CC:	akpm@...ux-foundation.org, linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: Check for the correct error return from ext4_ext_get_blocks

Aneesh Kumar K.V wrote:
> ext4_ext_get_blocks returns negative values on error. We should
> check for  <= 0
> 
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> ---
>  fs/ext4/extents.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index a2475d4..ce57245 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -2558,8 +2558,8 @@ retry:
>  		ret = ext4_ext_get_blocks(handle, inode, block,
>  					  max_blocks, &map_bh,
>  					  EXT4_CREATE_UNINITIALIZED_EXT, 0);
> -		WARN_ON(!ret);
> -		if (!ret) {
> +		WARN_ON(ret <= 0);
> +		if (ret <= 0) {
>  			ext4_error(inode->i_sb, "ext4_fallocate",
>  				   "ext4_ext_get_blocks returned 0! inode#%lu"
>  				   ", block=%llu, max_blocks=%llu",

Need to change the "returned 0!" part of the error to "returned %d!"
then too, I guess?

-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ