Re: [f2fs-dev] [PATCH] f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

2018-01-29 Thread Sheng Yong
On 2018/1/29 16:58, Chao Yu wrote: Hi Sheng Yong, On 2018/1/29 16:39, Sheng Yong wrote: Hi, Chao On 2018/1/29 16:27, Chao Yu wrote: On 2018/1/29 16:04, Sheng Yong wrote: sb_getblk does not guarantee the buffer head is uptodate. If bh is not uptodate, the data (may be used as boot code) in

Re: [f2fs-dev] [PATCH] f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

2018-01-29 Thread Chao Yu
Hi Sheng Yong, On 2018/1/29 16:39, Sheng Yong wrote: > Hi, Chao > > On 2018/1/29 16:27, Chao Yu wrote: >> On 2018/1/29 16:04, Sheng Yong wrote: >>> sb_getblk does not guarantee the buffer head is uptodate. If bh is not >>> uptodate, the data (may be used as boot code) in area before >> >> Why

Re: [f2fs-dev] [PATCH] f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

2018-01-29 Thread Sheng Yong
Hi, Chao On 2018/1/29 16:27, Chao Yu wrote: On 2018/1/29 16:04, Sheng Yong wrote: sb_getblk does not guarantee the buffer head is uptodate. If bh is not uptodate, the data (may be used as boot code) in area before Why boot code can be stored into the position f2fs superblock locates?

Re: [f2fs-dev] [PATCH] f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

2018-01-29 Thread Chao Yu
On 2018/1/29 16:04, Sheng Yong wrote: > sb_getblk does not guarantee the buffer head is uptodate. If bh is not > uptodate, the data (may be used as boot code) in area before Why boot code can be stored into the position f2fs superblock locates? And even we have updated the buffer, we will still

[f2fs-dev] [PATCH] f2fs: fix potential corruption in area before F2FS_SUPER_OFFSET

2018-01-29 Thread Sheng Yong
sb_getblk does not guarantee the buffer head is uptodate. If bh is not uptodate, the data (may be used as boot code) in area before F2FS_SUPER_OFFSET may get corrupted when super block is committed. Signed-off-by: Sheng Yong --- fs/f2fs/super.c | 4 ++-- 1 file changed, 2