|
|
@@ -3261,6 +3261,11 @@ static int read_compacted_summaries(struct f2fs_sb_info *sbi)
|
|
|
seg_i = CURSEG_I(sbi, i);
|
|
|
segno = le32_to_cpu(ckpt->cur_data_segno[i]);
|
|
|
blk_off = le16_to_cpu(ckpt->cur_data_blkoff[i]);
|
|
|
+ if (blk_off > ENTRIES_IN_SUM) {
|
|
|
+ f2fs_bug_on(sbi, 1);
|
|
|
+ f2fs_put_page(page, 1);
|
|
|
+ return -EFAULT;
|
|
|
+ }
|
|
|
seg_i->next_segno = segno;
|
|
|
reset_curseg(sbi, i, 0);
|
|
|
seg_i->alloc_type = ckpt->alloc_type[i];
|