From: Alexey Dobriyan Date: Thu, 5 Feb 2009 21:30:05 +0000 (+0300) Subject: seq_file: fix big-enough lseek() + read() X-Git-Tag: v2.6.27.16~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de6470415bc59d9d5736799c0803c6103b7d86b9;p=pandora-kernel.git seq_file: fix big-enough lseek() + read() commit f01d1d546abb2f4028b5299092f529eefb01253a upstream. lseek() further than length of the file will leave stale ->index (second-to-last during iteration). Next seq_read() will not notice that ->f_pos is big enough to return 0, but will print last item as if ->f_pos is pointing to it. Introduced in commit cb510b8172602a66467f3551b4be1911f5a7c8c2 aka "seq_file: more atomicity in traverse()". Signed-off-by: Alexey Dobriyan Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed