-
由 Miklos Szeredi 提交于
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: NRich Felker <dalias@libc.org> Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com> Fixes: e522751d ("seq_file: reset iterator to first record for zero offset") Cc: <stable@vger.kernel.org> # v4.10 Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
cf5eebae