mconsole: we'd better initialize pos before passing it to vfs_read()...
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Jun 2013 08:35:42 +0000 (12:35 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 19 Jun 2013 08:37:57 +0000 (12:37 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
arch/um/drivers/mconsole_kern.c

index d7d2185..3df3bd5 100644 (file)
@@ -147,7 +147,7 @@ void mconsole_proc(struct mc_request *req)
        }
 
        do {
-               loff_t pos;
+               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);