Skip to content

Commit bce2b68

Browse files
Christoph Hellwigtorvalds
authored andcommitted
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>
1 parent 48304f7 commit bce2b68

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/exec.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ ssize_t read_code(struct file *file, unsigned long addr, loff_t pos, size_t len)
10591059
{
10601060
ssize_t res = vfs_read(file, (void __user *)addr, len, &pos);
10611061
if (res > 0)
1062-
flush_icache_range(addr, addr + len);
1062+
flush_icache_user_range(addr, addr + len);
10631063
return res;
10641064
}
10651065
EXPORT_SYMBOL(read_code);

0 commit comments

Comments
 (0)