[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <44b8bbff-0ade-d390-e2df-7a66d6c3f19c@linux.ibm.com>
Date: Thu, 30 Jan 2020 14:09:42 +0100
From: Peter Oberparleiter <oberpar@...ux.ibm.com>
To: Vasily Averin <vvs@...tuozzo.com>, 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>
Subject: Re: [PATCH 2/7] gcov_seq_next should increase position index
On 24.01.2020 08:02, Vasily Averin wrote:
> 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>
Acked-by: Peter Oberparleiter <oberpar@...ux.ibm.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;
> }
>
--
Peter Oberparleiter
Linux on Z Development - IBM Germany
Powered by blists - more mailing lists