[26/29] exec: use flush_icache_user_range in read_code
diff mbox series

Message ID 20200515143646.3857579-27-hch@lst.de
State New
Headers show
Series
  • [01/29] arm: fix the flush_icache_range arguments in set_fiq_handler
Related show

Commit Message

Christoph Hellwig May 15, 2020, 2:36 p.m. UTC
read_code operates on user addresses.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/exec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/fs/exec.c b/fs/exec.c
index a4f766f296f8f..c541867316a63 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1033,7 +1033,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);