diff options
Diffstat (limited to 'fs/exec.c')
-rw-r--r-- | fs/exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c index 93ff1c4c7ebb..02d0c5d19be5 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -1053,14 +1053,17 @@ out: } EXPORT_SYMBOL_GPL(kernel_read_file_from_fd); +#if defined(CONFIG_HAVE_AOUT) || defined(CONFIG_BINFMT_FLAT) || \ + defined(CONFIG_BINFMT_ELF_FDPIC) 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); +#endif /* * Maps the mm_struct mm into the current task struct. |