Skip to contentSkip to conversation

EXT3: ext3 block bitmap leakage

PATCH New Kirill Korotaev 1 participant 1 message Jun 30, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EXT3: ext3 block bitmap leakage

Andrew, Chris,

this bug is not relevant for 2.6.17 and later.
However, it is relevant for all 2.4.x and <2.6.17 kernels,
so I think this can be of interest to some people and worth commiting to 2.6.16.x

This patch fixes ext3 block bitmap leakage,
which leads to the following fsck messages on
_healthy_ filesystem:
Block bitmap differences: -64159 -73707

All kernels up to 2.6.17 have this bug.

Found by
Vasily Averin <[email protected]> and Andrey Savochkin <[email protected]>
Test case triggered the issue was created by
Dmitry Monakhov <[email protected]>

fs/ext3/inode.c renamed from fs/ext3/inode.c.e3crp +1 -0
@@ -585,6 +585,7 @@ static int ext3_alloc_branch(handle_t *h
 
 	branch[0].key = cpu_to_le32(parent);
 	if (parent) {
+		keys = 1;
 		for (n = 1; n < num; n++) {
 			struct buffer_head *bh;
 			/* Allocate the next block */