The patch titled seq_file: fix big-enough lseek() + read() has been added to the -mm tree. Its filename is seq_file-fix-big-enough-lseek-read.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: seq_file: fix big-enough lseek() + read() From: Alexey Dobriyan <adobriyan@xxxxxxxxx> 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 ("seq_file: more atomicity in traverse()"). Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: <stable@xxxxxxxxxx> [2.6.25.x, 2.6.26.x, 2.6.27.x, 2.6.28.x] Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Paul Turner <pjt@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/seq_file.c | 1 + 1 file changed, 1 insertion(+) diff -puN fs/seq_file.c~seq_file-fix-big-enough-lseek-read fs/seq_file.c --- a/fs/seq_file.c~seq_file-fix-big-enough-lseek-read +++ a/fs/seq_file.c @@ -110,6 +110,7 @@ static int traverse(struct seq_file *m, p = m->op->next(m, p, &index); } m->op->stop(m, p); + m->index = index; return error; Eoverflow: _ Patches currently in -mm which might be from adobriyan@xxxxxxxxx are origin.patch alpha-fixup-bug-macro.patch vfs-separate-fmode_pread-fmode_pwrite-into-separate-flags.patch vfs-separate-fmode_pread-fmode_pwrite-into-separate-flags-fix.patch seq_file-move-traverse-so-it-can-be-used-from-seq_read.patch seq_file-properly-cope-with-pread.patch seq_file-properly-cope-with-pread-fix.patch seq_file-fix-big-enough-lseek-read.patch linux-next.patch eeepc-should-depend-on-input.patch tags-fix-config-symbols-generation.patch sm501-fix-section-mismatches.patch mpt-remove-unused-struct-mpt_proc_entry_t.patch proc-tty-add-struct-tty_operations-proc_fops.patch proc-tty-switch-cyclades-to-proc_fops.patch proc-tty-switch-ip2-to-proc_fops.patch proc-tty-switch-istallion-to-proc_fops.patch proc-tty-switch-synclink_cs-to-proc_fops.patch proc-tty-switch-stallion-to-proc_fops.patch proc-tty-switch-synclink-to-proc_fops.patch proc-tty-switch-synclink_gt-to-proc_fops.patch proc-tty-switch-synclinkmp-to-proc_fops.patch proc-tty-switch-sdio_uart-to-proc_fops.patch proc-tty-switch-serial_core-to-proc_fops.patch proc-tty-switch-usb-serial-to-proc_fops.patch proc-tty-switch-ircomm-to-proc_fops.patch proc-tty-switch-amiserial-to-proc_fops.patch proc-tty-switch-ia64-simserial-to-proc_fops.patch proc-tty-switch-xtensa-iss-console-to-proc_fops.patch proc-tty-remove-struct-tty_operations-read_proc.patch sysctl-min-max-range-check-is-broken.patch xtensa-fix-compilation-somewhat.patch softirq-introduce-statistics-for-softirq.patch proc-export-statistics-for-softirq-to-proc.patch proc-export-statistics-for-softirq-to-proc-fix.patch proc-update-document-for-proc-softirqs-and-proc-stat.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html