summaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-08 06:42:43 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-08 20:05:58 +0200
commitbce2b68b891af3dd02fdc1603786c1c28db8bfad (patch)
treedc6e05e7bf8ad289ac4211b51bbf96f05faa8b4d /fs/exec.c
parentexec: only build read_code when needed (diff)
downloadlinux-bce2b68b891af3dd02fdc1603786c1c28db8bfad.tar.xz
linux-bce2b68b891af3dd02fdc1603786c1c28db8bfad.zip
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>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 88260ec0ac34..02d0c5d19be5 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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);