[Devel] [PATCH RHEL7 COMMIT] ms/ext4: fix wrong assert in ext4_mb_normalize_request()

Konstantin Khorenko khorenko at virtuozzo.com
Wed Jun 24 03:03:08 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.17
------>
commit f688ee30458fe9bb896a7b25b723a8c2abadb940
Author: Dmitry Monakhov <dmonakhov at openvz.org>
Date:   Wed Jun 24 14:03:08 2015 +0400

    ms/ext4: fix wrong assert in ext4_mb_normalize_request()
    
    Original commit 5b60778558
    
    The variable "size" is expressed as number of blocks and not as
    number of clusters, this could trigger a kernel panic when using
    ext4 with the size of a cluster different from the size of a block.
    
    Cc: stable at vger.kernel.org
    Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>
    Signed-off-by: Theodore Ts'o <tytso at mit.edu>
    Signed-off-by: Dmitry Monakhov <dmonakhov at openvz.org>
---
 fs/ext4/mballoc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c
index dca78da..ebc7255 100644
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@ -3117,7 +3117,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
 	}
 	BUG_ON(start + size <= ac->ac_o_ex.fe_logical &&
 			start > ac->ac_o_ex.fe_logical);
-	BUG_ON(size <= 0 || size > EXT4_CLUSTERS_PER_GROUP(ac->ac_sb));
+	BUG_ON(size <= 0 || size > EXT4_BLOCKS_PER_GROUP(ac->ac_sb));
 
 	/* now prepare goal request */
 



More information about the Devel mailing list