summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-01 18:39:20 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2017-09-05 02:05:16 +0300
commit21cb2559eb510dfbe9b5d0dd31605f44d2cd2891 (patch)
treee1480e69a62e052804d690aca80549612c07c142
parent8e93157bdd4a9718ce8e05c370ab9fe48debb4c2 (diff)
downloadlinux-21cb2559eb510dfbe9b5d0dd31605f44d2cd2891.tar.xz
mconsole: switch to kernel_read
Instead of playing with address limits. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--arch/um/drivers/mconsole_kern.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index af326fb6510d..c4d162a94be9 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -148,12 +148,7 @@ void mconsole_proc(struct mc_request *req)
}
do {
- loff_t pos = file->f_pos;
- mm_segment_t old_fs = get_fs();
- set_fs(KERNEL_DS);
- len = vfs_read(file, buf, PAGE_SIZE - 1, &pos);
- set_fs(old_fs);
- file->f_pos = pos;
+ len = kernel_read(file, buf, PAGE_SIZE - 1, &file->f_pos);
if (len < 0) {
mconsole_reply(req, "Read of file failed", 1, 0);
goto out_free;