diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-02-05 04:08:21 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-02 07:19:24 +0400 |
commit | ec69557982563c97b3a7d68dd271be5105b83869 (patch) | |
tree | a28bb77318d9bf8b930a5fae0114629bda70bf7f /fs/exec.c | |
parent | 0165e8100be3b2b81f747ebc25418656404c61b8 (diff) | |
download | linux-ec69557982563c97b3a7d68dd271be5105b83869.tar.xz |
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/exec.c')
-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; |