diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-05 01:08:21 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-02 05:19:24 +0200 |
commit | ec69557982563c97b3a7d68dd271be5105b83869 (patch) | |
tree | a28bb77318d9bf8b930a5fae0114629bda70bf7f /fs | |
parent | fold cifs_iovec_read() into its (only) caller (diff) | |
download | linux-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.c | 2 |
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; |