lkml.org 
[lkml]   [2014]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13 058/198] ext4: fix wrong assert in ext4_mb_normalize_request()
    Date
    3.13.11.5 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Maurizio Lombardi <mlombard@redhat.com>

    commit b5b60778558cafad17bbcbf63e0310bd3c68eb17 upstream.

    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.

    Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    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 04a5c75..08ddfda 100644
    --- a/fs/ext4/mballoc.c
    +++ b/fs/ext4/mballoc.c
    @@ -3135,7 +3135,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 */

    --
    1.9.1


    \
     
     \ /
      Last update: 2014-07-20 00:41    [W:3.797 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site