GIT: unionfs2-2.6.27.y: ext4: Avoid null pointer dereference when decoding EROFS w/o a journal
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:12 EDT 2010
commit a3edfd184017a67b30080c1e0d46b91d7306b3d9
Author: Theodore Ts'o <tytso at mit.edu>
Date: Mon Jul 27 23:09:47 2009 -0400
ext4: Avoid null pointer dereference when decoding EROFS w/o a journal
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 at lsexperts.de>
Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index db2642a..baacaf8 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -254,7 +254,8 @@ static const char *ext4_decode_error(struct super_block *sb, int errno,
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";
More information about the unionfs-cvs
mailing list