lkml.org 
[lkml]   [2010]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[27/45] ext4: Avoid null pointer dereference when decoding EROFS w/o a journal
    2.6.27-stable review patch.  If anyone has any objections, please let us know.

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

    From: Theodore Ts'o <tytso@mit.edu>

    commit 78f1ddbb498283c2445c11b0dfa666424c301803 upstream.

    We need to check to make sure a journal is present before checking the
    journal flags in ext4_decode_error().

    Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    fs/ext4/super.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    --- a/fs/ext4/super.c
    +++ b/fs/ext4/super.c
    @@ -254,7 +254,8 @@ static const char *ext4_decode_error(str
    errstr = "Out of memory";
    break;
    case -EROFS:
    - if (!sb || EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT)
    + if (!sb || (EXT4_SB(sb)->s_journal &&
    + EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT))
    errstr = "Journal has aborted";
    else
    errstr = "Readonly filesystem";



    \
     
     \ /
      Last update: 2010-03-31 02:39    [W:3.750 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site