summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-07 21:42:43 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-08 11:05:58 -0700
commitbce2b68b891af3dd02fdc1603786c1c28db8bfad (patch)
treedc6e05e7bf8ad289ac4211b51bbf96f05faa8b4d /fs/exec.c
parent48304f7994d74ef8fddde3ff27ce41aa61453d39 (diff)
downloadlwn-bce2b68b891af3dd02fdc1603786c1c28db8bfad.tar.gz
lwn-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);