diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2018-02-09 20:35:16 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-09 22:28:01 -0500 |
commit | 7a501609c2cb73381e925827c504a4c2c2cb0817 (patch) | |
tree | e16eb57e0b245a7082e4ee1827fd2f9587e6e97e /arch/um | |
parent | 878e66d06fd098a744b9caafdd0e99bba415ce37 (diff) |
mconsole_proc(): don't mess with file->f_pos
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index c4d162a94be9..d5f9a2d1da1b 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -130,6 +130,7 @@ void mconsole_proc(struct mc_request *req) | |||
130 | struct file *file; | 130 | struct file *file; |
131 | int first_chunk = 1; | 131 | int first_chunk = 1; |
132 | char *ptr = req->request.data; | 132 | char *ptr = req->request.data; |
133 | loff_t pos = 0; | ||
133 | 134 | ||
134 | ptr += strlen("proc"); | 135 | ptr += strlen("proc"); |
135 | ptr = skip_spaces(ptr); | 136 | ptr = skip_spaces(ptr); |
@@ -148,7 +149,7 @@ void mconsole_proc(struct mc_request *req) | |||
148 | } | 149 | } |
149 | 150 | ||
150 | do { | 151 | do { |
151 | len = kernel_read(file, buf, PAGE_SIZE - 1, &file->f_pos); | 152 | len = kernel_read(file, buf, PAGE_SIZE - 1, &pos); |
152 | if (len < 0) { | 153 | if (len < 0) { |
153 | mconsole_reply(req, "Read of file failed", 1, 0); | 154 | mconsole_reply(req, "Read of file failed", 1, 0); |
154 | goto out_free; | 155 | goto out_free; |