OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
dd58d38
)
Merge JFFS2 updates from David Woodhouse
author
Brian Norris
<computersforpeace@gmail.com>
Tue, 17 Feb 2015 02:04:41 +0000
(18:04 -0800)
committer
Brian Norris
<computersforpeace@gmail.com>
Tue, 17 Feb 2015 02:05:26 +0000
(18:05 -0800)
fs/jffs2/scan.c
patch
|
blob
|
history
diff --git
a/fs/jffs2/scan.c
b/fs/jffs2/scan.c
index
7654e87
..
9ad5ba4
100644
(file)
--- 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) {