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]
Date:	Tue, 21 Jan 2014 15:45:33 +0800
From:	Zheng Liu <gnehzuil.liu@...il.com>
To:	"Darrick J. Wong" <darrick.wong@...cle.com>
Cc:	tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 5/6] libext2fs: don't hang on to unmapped block if extent
 tree update fails

On Mon, Jan 20, 2014 at 10:22:11PM -0800, Darrick J. Wong wrote:
> If we're doing a BMAP_ALLOC allocation and the extent tree update
> fails, there's no point in hanging on to the newly allocated block.
> So, free it to make fsck happy.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>

Reviewed-by: Zheng Liu <wenqing.lz@...bao.com>
                                                - Zheng

> ---
>  lib/ext2fs/bmap.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/lib/ext2fs/bmap.c b/lib/ext2fs/bmap.c
> index b944c27..db2fd72 100644
> --- a/lib/ext2fs/bmap.c
> +++ b/lib/ext2fs/bmap.c
> @@ -255,8 +255,10 @@ got_block:
>  	set_extent:
>  		retval = ext2fs_extent_set_bmap(handle, block,
>  						blk64, 0);
> -		if (retval)
> +		if (retval) {
> +			ext2fs_block_alloc_stats2(fs, blk64, -1);
>  			return retval;
> +		}
>  		/* Update inode after setting extent */
>  		retval = ext2fs_read_inode(fs, ino, inode);
>  		if (retval)
> 
> --
> 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
--
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