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]
Message-ID: <4E28FA31.7090405@redhat.com>
Date:	Thu, 21 Jul 2011 23:18:57 -0500
From:	Eric Sandeen <sandeen@...hat.com>
To:	Yongqiang Yang <xiaoqiangnk@...il.com>
CC:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: [PATCH V2] e2fsck: fix error in computing blocks of the ending group

From: Yongqiang Yang <xiaoqiangnk@...il.com>

If the blocks of a filesystem is a multiple of blocks_per_group,
blocks of the ending group is computed wrongly.  Use the
new ext2fs_group_blocks_count() helper instead.

Eric Sandeen: Converted to use new blocks per group helper

Signed-off-by: Yongqiang Yang <xiaoqiangnk@...il.com>
---

diff --git a/e2fsck/pass5.c b/e2fsck/pass5.c
index f9d746c..2a28c7a 100644
--- a/e2fsck/pass5.c
+++ b/e2fsck/pass5.c
@@ -225,9 +225,8 @@ redo_counts:
 				count = 0;
 				cmp_block = fs->super->s_clusters_per_group;
 				if (group == (int)fs->group_desc_count - 1)
-					cmp_block =
-						EXT2FS_NUM_B2C(fs,
-		ext2fs_blocks_count(fs->super) % fs->super->s_blocks_per_group);
+					cmp_block = EXT2FS_NUM_B2C(fs,
+						    ext2fs_group_blocks_count(fs, group));
 			}
 
 			bitmap = 0;
--
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