提交 bce2b68b 编写于 作者: C Christoph Hellwig 提交者: Linus Torvalds

exec: use flush_icache_user_range in read_code

read_code operates on user addresses.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Link: http://lkml.kernel.org/r/20200515143646.3857579-27-hch@lst.deSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 48304f79
......@@ -1059,7 +1059,7 @@ ssize_t read_code(struct file *file, unsigned long addr, loff_t pos, size_t len)
{
ssize_t res = vfs_read(file, (void __user *)addr, len, &pos);
if (res > 0)
flush_icache_range(addr, addr + len);
flush_icache_user_range(addr, addr + len);
return res;
}
EXPORT_SYMBOL(read_code);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册