exec: use flush_icache_user_range in read_code
read_code operates on user addresses. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Link: http://lkml.kernel.org/r/20200515143646.3857579-27-hch@lst.de Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
48304f7994
commit
bce2b68b89
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue