summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2017-11-15 11:34:58 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-02-22 15:42:28 +0100
commit29b4af70409cfca62d045cd4e0170912ab262c66 (patch)
treeb97abcbd943f432e07887b161621d0128a16cfb6 /kernel
parent0f0fd00739118302568ff8b57ddfc5898c1a3796 (diff)
downloadlinux-29b4af70409cfca62d045cd4e0170912ab262c66.tar.gz
linux-29b4af70409cfca62d045cd4e0170912ab262c66.tar.bz2
linux-29b4af70409cfca62d045cd4e0170912ab262c66.zip
seq_file: fix incomplete reset on read from zero offset
commit cf5eebae2cd28d37581507668605f4d23cd7218d upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions