From: Peter Oberparleiter <oberpar@linux.ibm.com>
To: Vasily Averin <vvs@virtuozzo.com>, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
NeilBrown <neilb@suse.com>, Waiman Long <longman@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 2/7] gcov_seq_next should increase position index
Date: Thu, 30 Jan 2020 14:09:42 +0100 [thread overview]
Message-ID: <44b8bbff-0ade-d390-e2df-7a66d6c3f19c@linux.ibm.com> (raw)
In-Reply-To: <f65c6ee7-bd00-f910-2f8a-37cc67e4ff88@virtuozzo.com>
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@virtuozzo.com>
Acked-by: Peter Oberparleiter <oberpar@linux.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
next prev parent reply other threads:[~2020-01-30 13:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 7:02 [PATCH 2/7] gcov_seq_next should increase position index Vasily Averin
2020-01-30 13:09 ` Peter Oberparleiter [this message]
2020-02-25 6:36 ` Vasily Averin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44b8bbff-0ade-d390-e2df-7a66d6c3f19c@linux.ibm.com \
--to=oberpar@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mingo@redhat.com \
--cc=neilb@suse.com \
--cc=rostedt@goodmis.org \
--cc=vvs@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox