Loading fs/jffs2/scan.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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); sumlen = c->sector_size - je32_to_cpu(sm->offset); sumptr = buf + buf_size - sumlen; 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 */ /* Now, make sure the summary itself is available */ if (sumlen > buf_size) { if (sumlen > buf_size) { /* Need to kmalloc for this. */ /* Need to kmalloc for this. */ Loading Loading @@ -544,6 +548,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo } } } } full_scan: buf_ofs = jeb->offset; buf_ofs = jeb->offset; if (!buf_size) { if (!buf_size) { Loading Loading
fs/jffs2/scan.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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); sumlen = c->sector_size - je32_to_cpu(sm->offset); sumptr = buf + buf_size - sumlen; 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 */ /* Now, make sure the summary itself is available */ if (sumlen > buf_size) { if (sumlen > buf_size) { /* Need to kmalloc for this. */ /* Need to kmalloc for this. */ Loading Loading @@ -544,6 +548,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo } } } } full_scan: buf_ofs = jeb->offset; buf_ofs = jeb->offset; if (!buf_size) { if (!buf_size) { Loading