diff options
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r-- | fs/jbd2/journal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index f24df13adc4e..d6e93d00833e 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -1251,6 +1251,14 @@ static int journal_get_superblock(journal_t *journal) | |||
1251 | goto out; | 1251 | goto out; |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | if (be32_to_cpu(sb->s_first) == 0 || | ||
1255 | be32_to_cpu(sb->s_first) >= journal->j_maxlen) { | ||
1256 | printk(KERN_WARNING | ||
1257 | "JBD2: Invalid start block of journal: %u\n", | ||
1258 | be32_to_cpu(sb->s_first)); | ||
1259 | goto out; | ||
1260 | } | ||
1261 | |||
1254 | return 0; | 1262 | return 0; |
1255 | 1263 | ||
1256 | out: | 1264 | out: |