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  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:	Fri, 21 Nov 2008 11:20:41 -0600
From:	Eric Sandeen <sandeen@...hat.com>
To:	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
CC:	cmm@...ibm.com, tytso@....edu, linux-ext4@...r.kernel.org
Subject: Re: [PATCH -V2 1/5] ext4: Remove unneeded code.

Aneesh Kumar K.V wrote:
> This also caused an ext4_error when mounting a file system
> with only one block group.

To make the commit log more useful, could you change it to something
more like:

ext4: Fix ext4_error case when only one block group exists

Leftover code in ext4_fill_flex_info was unconditionally calling
ext4_get_group_desc() for block group 1, and the result of that call was
never actually used.  Worse, if we have a filesystem with only 1 block
group, (bg 0), the call would fail and call ext4_error() with the message:

"EXT4-fs error (device XXX): ext4_get_group_desc: block_group >=
groups_count - block_group = 1, groups_count = 1"

when attempting to mount a 1-blockgroup filesystem.

Just remove the unused call to fix this problem.

> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.vnet.ibm.com>
> ---
>  fs/ext4/super.c |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 0582522..b5c7658 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1451,7 +1451,6 @@ static int ext4_fill_flex_info(struct super_block *sb)
>  	ext4_group_t flex_group_count;
>  	ext4_group_t flex_group;
>  	int groups_per_flex = 0;
> -	__u64 block_bitmap = 0;
>  	int i;
>  
>  	if (!sbi->s_es->s_log_groups_per_flex) {
> @@ -1474,9 +1473,6 @@ static int ext4_fill_flex_info(struct super_block *sb)
>  		goto failed;
>  	}
>  
> -	gdp = ext4_get_group_desc(sb, 1, &bh);
> -	block_bitmap = ext4_block_bitmap(sb, gdp) - 1;
> -
>  	for (i = 0; i < sbi->s_groups_count; i++) {
>  		gdp = ext4_get_group_desc(sb, i, &bh);
>  

--
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