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 d7d21851e60c12f0c3f64933a8c8e2856586ac46..3df3bd544492012ab9b78b0c43ab2648a1760e61 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);