提交 ae44f9c2 编写于 作者: M Matthew Wilcox (Oracle) 提交者: Darrick J. Wong

iomap: Add another assertion to inline data handling

Check that the file tail does not cross a page boundary.  Requested by
Andreas.
Signed-off-by: NMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: NDarrick J. Wong <djwong@kernel.org>
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
上级 ab069d5f
......@@ -215,6 +215,8 @@ static int iomap_read_inline_data(struct inode *inode, struct page *page,
if (PageUptodate(page))
return PAGE_SIZE - poff;
if (WARN_ON_ONCE(size > PAGE_SIZE - poff))
return -EIO;
if (WARN_ON_ONCE(size > PAGE_SIZE -
offset_in_page(iomap->inline_data)))
return -EIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册