linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Carlos Maiolino <cmaiolino@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	syzbot+2b9e54155c8c25d8d165@syzkaller.appspotmail.com
Subject: Re: [PATCH V2] block: add bio_truncate to fix guard_bio_eod
Date: Wed, 8 Jan 2020 23:17:39 -0800	[thread overview]
Message-ID: <20200109071739.GB32217@infradead.org> (raw)
In-Reply-To: <20200109020524.GD9655@ming.t460p>

On Thu, Jan 09, 2020 at 10:05:24AM +0800, Ming Lei wrote:
> OK, will do that.
> 
> > 
> > > +	if (bio_data_dir(bio) != READ)
> > > +		goto exit;
> > 
> > This really should check the passed in op for REQ_OP_READ directly instead
> > of just the direction on the potentially not fully set up bio.
> 
> It has been addressed in:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git/commit/?h=block-5.5&id=802ca0381befe29ba0783e08e3369f9e87ef9d0d

Well, it fixes the bug introduced.  But it still uses bio_data_dir
instead of the explicit REQ_OP_READ check, and still uses a calling
convention that leads to such errors.

      reply	other threads:[~2020-01-09  7:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-27 23:05 [PATCH V2] block: add bio_truncate to fix guard_bio_eod Ming Lei
2019-12-28 16:45 ` Jens Axboe
2020-01-08 13:37 ` Christoph Hellwig
2020-01-09  2:05   ` Ming Lei
2020-01-09  7:17     ` Christoph Hellwig [this message]

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=20200109071739.GB32217@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=cmaiolino@redhat.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=syzbot+2b9e54155c8c25d8d165@syzkaller.appspotmail.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;
as well as URLs for NNTP newsgroup(s).