[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <f65c6ee7-bd00-f910-2f8a-37cc67e4ff88@virtuozzo.com>
Date: Fri, 24 Jan 2020 10:02:47 +0300
From: Vasily Averin <vvs@...tuozzo.com>
To: linux-kernel@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
NeilBrown <neilb@...e.com>, Waiman Long <longman@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Oberparleiter <oberpar@...ux.ibm.com>
Subject: [PATCH 2/7] 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
Signed-off-by: Vasily Averin <vvs@...tuozzo.com>
---
kernel/gcov/fs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index e5eb5ea..cc4ee48 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -108,9 +108,9 @@ static void *gcov_seq_next(struct seq_file *seq, void *data, loff_t *pos)
{
struct gcov_iterator *iter = data;
+ (*pos)++;
if (gcov_iter_next(iter))
return NULL;
- (*pos)++;
return iter;
}
--
1.8.3.1
Powered by blists - more mailing lists