The patch titled Subject: kernel/gcov/fs.c: gcov_seq_next() should increase position index has been added to the -mm tree. Its filename is gcov_seq_next-should-increase-position-index.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/gcov_seq_next-should-increase-position-index.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/gcov_seq_next-should-increase-position-index.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/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Vasily Averin <vvs@xxxxxxxxxxxxx> Subject: kernel/gcov/fs.c: gcov_seq_next() should increase position index If seq_file .next fuction does not change position index, read after some lseek can generate unexpected output. https://bugzilla.kernel.org/show_bug.cgi?id=206283 Link: http://lkml.kernel.org/r/f65c6ee7-bd00-f910-2f8a-37cc67e4ff88@xxxxxxxxxxxxx Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx> Acked-by: Peter Oberparleiter <oberpar@xxxxxxxxxxxxx> Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Manfred Spraul <manfred@xxxxxxxxxxxxxxxx> Cc: NeilBrown <neilb@xxxxxxxx> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> Cc: Waiman Long <longman@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/gcov/fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/gcov/fs.c~gcov_seq_next-should-increase-position-index +++ a/kernel/gcov/fs.c @@ -108,9 +108,9 @@ static void *gcov_seq_next(struct seq_fi { struct gcov_iterator *iter = data; + (*pos)++; if (gcov_iter_next(iter)) return NULL; - (*pos)++; return iter; } _ Patches currently in -mm which might be from vvs@xxxxxxxxxxxxx are seq_read-info-message-about-buggy-next-functions.patch pstore_ftrace_seq_next-should-increase-position-index.patch gcov_seq_next-should-increase-position-index.patch sysvipc_find_ipc-should-increase-position-index.patch