diff options
author | Ingo Molnar | 2015-03-23 10:50:29 +0100 |
---|---|---|
committer | Ingo Molnar | 2015-03-23 10:50:29 +0100 |
commit | e1b63dec2ddba654c7ca75996284e453f32d1af7 (patch) | |
tree | c48fbfdb84b4e1b6b416b0e2ce7e14cd1350c5f5 /fs/jffs2/scan.c | |
parent | f8e617f4582995f7c25ef25b4167213120ad122b (diff) | |
parent | 746db9443ea57fd9c059f62c4bfbf41cf224fe13 (diff) |
Merge branch 'sched/urgent' into sched/core, to pick up fixes before applying new patches
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r-- | fs/jffs2/scan.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 7654e87b0428..9ad5ba4b299b 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -510,6 +510,10 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo sumlen = c->sector_size - je32_to_cpu(sm->offset); sumptr = buf + buf_size - sumlen; + /* sm->offset maybe wrong but MAGIC maybe right */ + if (sumlen > c->sector_size) + goto full_scan; + /* Now, make sure the summary itself is available */ if (sumlen > buf_size) { /* Need to kmalloc for this. */ @@ -544,6 +548,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo } } +full_scan: buf_ofs = jeb->offset; if (!buf_size) { |