summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-02-04 19:08:21 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-04-01 23:19:24 -0400
commitec69557982563c97b3a7d68dd271be5105b83869 (patch)
treea28bb77318d9bf8b930a5fae0114629bda70bf7f
parent0165e8100be3b2b81f747ebc25418656404c61b8 (diff)
downloadop-kernel-dev-ec69557982563c97b3a7d68dd271be5105b83869.zip
op-kernel-dev-ec69557982563c97b3a7d68dd271be5105b83869.tar.gz
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>
-rw-r--r--fs/exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 3d78fcc..4cc9453 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;
OpenPOWER on IntegriCloud