Re: Patch "ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct" has been added to the 3.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 29, 2014 at 12:12:02PM -0700, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> 
> This is a note to let you know that I've just added the patch titled
> 
>     ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa struct
> 
> From 86f0afd463215fc3e58020493482faa4ac3a4d69 Mon Sep 17 00:00:00 2001

Hi Greg,

Please sure you also grab this commit (which just hit mainline today,
along with a bunch of other ext4 patches marked for the stable kernel)
as well, since this commit fixes a bug introduced by "86f0afd46321:
ext4: fix ext4_discard_allocated_blocks() if we can't allocate the pa
struct".

Cheers,

						- Ted

commit c99d1e6e83b06744c75d9f5e491ed495a7086b7b
Author: Theodore Ts'o <tytso@xxxxxxx>
Date:   Sat Aug 23 17:47:28 2014 -0400

    ext4: fix BUG_ON in mb_free_blocks()
    
    If we suffer a block allocation failure (for example due to a memory
    allocation failure), it's possible that we will call
    ext4_discard_allocated_blocks() before we've actually allocated any
    blocks.  In that case, fe_len and fe_start in ac->ac_f_ex will still
    be zero, and this will result in mb_free_blocks(inode, e4b, 0, 0)
    triggering the BUG_ON on mb_free_blocks():
    
        BUG_ON(last >= (sb->s_blocksize << 3));
    
    Fix this by bailing out of ext4_discard_allocated_blocks() if fs_len
    is zero.
    
    Also fix a missing ext4_mb_unload_buddy() call in
    ext4_discard_allocated_blocks().
    
    Google-Bug-Id: 16844242
    
    Fixes: 86f0afd463215fc3e58020493482faa4ac3a4d69
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Cc: stable@xxxxxxxxxxxxxxx

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]