f2fs: check total CP pack block count correctly
PATCH 1/1 f2fs: check total CP pack block count correctly
--- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/f2fs/checkpoint.c +1 -1
@@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, goto invalid_cp1;if (le32_to_cpu (cp_block->cp_pack_total_block_count) > - sbi->log_blocks_per_seg) { + sbi->blocks_per_seg -1 ) {f2fs_msg (sbi->sb,KERN_WARNING ,"invalid cp_pack_total_block_count:%u" ,le32_to_cpu (cp_block->cp_pack_total_block_count));
Signature · 6 lines
2.17.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Hi Sheng,
Quoted 3 lines · Sheng Yong
Fixes 652d19558a347 ('f2fs: fix to do sanity check with block address in main area')Reported-by Zhang Xiaobo <[email protected]>Signed-off-by Sheng Yong <[email protected]>
That's my bad, and thanks for the fix.
Do you mind merge this into buggy patch, since the patch has not been upstreamed yet.
Thanks,
Quoted 10 lines
--- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/checkpoint.c +0
-0
fs/f2fs/checkpoint.c static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, · line 815
Quoted 8 lines
fs/f2fs/checkpoint.c +1
-1@@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, goto invalid_cp1;if (le32_to_cpu (cp_block->cp_pack_total_block_count) > - sbi->log_blocks_per_seg) { + sbi->blocks_per_seg -1 ) {f2fs_msg (sbi->sb,KERN_WARNING ,"invalid cp_pack_total_block_count:%u" ,le32_to_cpu (cp_block->cp_pack_total_block_count));
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 11 lines · Chao Yu
Hi Sheng,
Quoted 3 lines · Sheng Yong
Fixes 652d19558a347 ('f2fs: fix to do sanity check with block address in main area')Reported-by Zhang Xiaobo <[email protected]>Signed-off-by Sheng Yong <[email protected]>That's my bad, and thanks for the fix.
Do you mind merge this into buggy patch, since the patch has not been upstreamed yet.
No, of course not :)
Thanks,
Quoted 14 lines
Thanks,
Quoted 11 lines
--- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/checkpoint.c +0
-0@@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, goto invalid_cp1;
Quoted 11 lines
fs/f2fs/checkpoint.c static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, · line 815
Quoted 7 lines
fs/f2fs/checkpoint.c +1
-1if (le32_to_cpu (cp_block->cp_pack_total_block_count) > - sbi->log_blocks_per_seg) { + sbi->blocks_per_seg -1 ) {f2fs_msg (sbi->sb,KERN_WARNING ,"invalid cp_pack_total_block_count:%u" ,le32_to_cpu (cp_block->cp_pack_total_block_count));.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 33 lines · Sheng Yong
Quoted 11 lines · Chao Yu
Hi Sheng,
Quoted 3 lines · Sheng Yong
Fixes 652d19558a347 ('f2fs: fix to do sanity check with block address in main area')Reported-by Zhang Xiaobo <[email protected]>Signed-off-by Sheng Yong <[email protected]>That's my bad, and thanks for the fix.
Do you mind merge this into buggy patch, since the patch has not been upstreamed yet.
No, of course not :)
Thanks,
Quoted 14 lines
Thanks,
Quoted 11 lines
--- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/checkpoint.c +0
-0@@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, goto invalid_cp1;
Quoted 3 lines
Quoted 3 lines
fs/f2fs/checkpoint.c static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, · line 812
Quoted 3 lines
fs/f2fs/checkpoint.c +1
-1if (le32_to_cpu (cp_block->cp_pack_total_block_count) > - sbi->log_blocks_per_seg) { + sbi->blocks_per_seg -1 ) {
actually, cp_pack_total_block_count can be sbi->blocks_per_seg?
Thanks,
Quoted 6 lines
Quoted 6 lines
Quoted 4 lines
fs/f2fs/checkpoint.c +0
-0f2fs_msg (sbi->sb,KERN_WARNING ,"invalid cp_pack_total_block_count:%u" ,le32_to_cpu (cp_block->cp_pack_total_block_count));
Quoted 6 lines
Quoted 2 lines
.
.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Quoted 34 lines · Chao Yu
Quoted 33 lines · Sheng Yong
Quoted 11 lines · Chao Yu
Hi Sheng,
Quoted 3 lines · Sheng Yong
Fixes 652d19558a347 ('f2fs: fix to do sanity check with block address in main area')Reported-by Zhang Xiaobo <[email protected]>Signed-off-by Sheng Yong <[email protected]>That's my bad, and thanks for the fix.
Do you mind merge this into buggy patch, since the patch has not been upstreamed yet.
No, of course not :)
Thanks,
Quoted 14 lines
Thanks,
Quoted 11 lines
--- fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/f2fs/checkpoint.c +0
-0@@ -809,7 +809,7 @@ static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, goto invalid_cp1;
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
fs/f2fs/checkpoint.c static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, · line 812
Quoted 3 lines
fs/f2fs/checkpoint.c +1
-1if (le32_to_cpu (cp_block->cp_pack_total_block_count) > - sbi->log_blocks_per_seg) { + sbi->blocks_per_seg -1 ) {actually,
cp_pack_total_block_countcan besbi->blocks_per_seg?
Oh, right, it can be sbi->blocks_per_seg :)
Thanks
Quoted 12 lines
Thanks,
Quoted 10 lines
Quoted 8 lines
fs/f2fs/checkpoint.c static struct page *validate_checkpoint(struct f2fs_sb_info *sbi, · line 815
Quoted 4 lines
fs/f2fs/checkpoint.c +0
-0f2fs_msg (sbi->sb,KERN_WARNING ,"invalid cp_pack_total_block_count:%u" ,le32_to_cpu (cp_block->cp_pack_total_block_count));.
Quoted 6 lines
Quoted 2 lines
.
.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot