Searched hist:cf5eebae (Results 1 - 1 of 1) sorted by path

/linux-master/fs/
H A Dseq_file.cdiff cf5eebae Wed Nov 15 03:34:58 MST 2017 Miklos Szeredi <mszeredi@redhat.com> seq_file: fix incomplete reset on read from zero offset

When resetting iterator on a zero offset we need to discard any data
already in the buffer (count), and private state of the iterator (version).

For example this bug results in first line being repeated in /proc/mounts
if doing a zero size read before a non-zero size read.

Reported-by: Rich Felker <dalias@libc.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: e522751d605d ("seq_file: reset iterator to first record for zero offset")
Cc: <stable@vger.kernel.org> # v4.10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Completed in 217 milliseconds