Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273186
b: refs/heads/master
c: 8762202
h: refs/heads/master
v: v3
  • Loading branch information
Eryu Guan authored and Theodore Ts'o committed Nov 1, 2011
1 parent 26edff6 commit c45d3b1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf52c6f7af55c48ab0fd5f990460b884b428d906
refs/heads/master: 8762202dd0d6e46854f786bdb6fb3780a1625efe
8 changes: 8 additions & 0 deletions trunk/fs/jbd/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,14 @@ static int journal_get_superblock(journal_t *journal)
goto out;
}

if (be32_to_cpu(sb->s_first) == 0 ||
be32_to_cpu(sb->s_first) >= journal->j_maxlen) {
printk(KERN_WARNING
"JBD: Invalid start block of journal: %u\n",
be32_to_cpu(sb->s_first));
goto out;
}

return 0;

out:
Expand Down
8 changes: 8 additions & 0 deletions trunk/fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1251,6 +1251,14 @@ static int journal_get_superblock(journal_t *journal)
goto out;
}

if (be32_to_cpu(sb->s_first) == 0 ||
be32_to_cpu(sb->s_first) >= journal->j_maxlen) {
printk(KERN_WARNING
"JBD2: Invalid start block of journal: %u\n",
be32_to_cpu(sb->s_first));
goto out;
}

return 0;

out:
Expand Down

0 comments on commit c45d3b1

Please sign in to comment.