summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-05 01:08:21 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-02 05:19:24 +0200
commitec69557982563c97b3a7d68dd271be5105b83869 (patch)
treea28bb77318d9bf8b930a5fae0114629bda70bf7f /fs
parentfold cifs_iovec_read() into its (only) caller (diff)
downloadlinux-ec69557982563c97b3a7d68dd271be5105b83869.tar.xz
linux-ec69557982563c97b3a7d68dd271be5105b83869.zip
read_code(): go through vfs_read() instead of calling the method directly
... and don't skip on sanity checks. It's *not* a hot path, TYVM (a couple of calls per a.out execve(), for pity sake) and headers of random a.out binary are not to be trusted. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 3d78fccdd723..4cc94534ed5b 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -810,7 +810,7 @@ EXPORT_SYMBOL(kernel_read);
ssize_t read_code(struct file *file, unsigned long addr, loff_t pos, size_t len)
{
- ssize_t res = file->f_op->read(file, (void __user *)addr, len, &pos);
+ ssize_t res = vfs_read(file, (void __user *)addr, len, &pos);
if (res > 0)
flush_icache_range(addr, addr + len);
return res;