mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Pengcheng Yang <yangpc@wangsu.com>
Cc: gregkh@linuxfoundation.org, jannh@google.com,
	viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] kernel/relay.c: fix read_pos error when multiple readers
Date: Thu, 23 Jan 2020 17:23:21 -0800	[thread overview]
Message-ID: <20200123172321.0ef6744e784692585f9843b3@linux-foundation.org> (raw)
In-Reply-To: <1579691175-28949-1-git-send-email-yangpc@wangsu.com>

On Wed, 22 Jan 2020 19:06:15 +0800 Pengcheng Yang <yangpc@wangsu.com> wrote:

> When reading, read_pos should start with bytes_consumed,
> not file->f_pos. Because when there is more than one reader,
> the read_pos corresponding to file->f_pos may have been consumed,
> which will cause the data that has been consumed to be read
> and the bytes_consumed update error.

That sounds fairly serious.  Are you able to describe a userspace setup
which will trigger this?  Do you have any test code which is able to
demonstrate the bug?

We really should have a relay testcase in tools/testing, but relay came
along before we became diligent about this.


  reply	other threads:[~2020-01-24  1:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-22 11:06 Pengcheng Yang
2020-01-24  1:23 ` Andrew Morton [this message]
2020-03-20 11:04   ` Pengcheng Yang

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=20200123172321.0ef6744e784692585f9843b3@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yangpc@wangsu.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

all inboxes | Powered by JetHome®