From: Christoph Hellwig <hch@lst.de>
To: Neil Brown <neilb@suse.de>
Cc: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
linux-raid@vger.kernel.org, dm-devel@redhat.com,
linux-btrfs@vger.kernel.org
Subject: Re: [dm-devel] [PATCH] block: add a bi_error field to struct bio
Date: Wed, 10 Jun 2015 10:45:53 +0200 [thread overview]
Message-ID: <20150610084553.GA5021@lst.de> (raw)
In-Reply-To: <20150610125054.3da2abcc@home.neil.brown.name>
On Wed, Jun 10, 2015 at 12:50:54PM +1000, Neil Brown wrote:
> This introduces a use-after-free. put_buf(r1_bio) can result in bio_put on
> 'bio'.
> It is safe to move the put_buf call after the md_done_sync(), but it is
> probably best to leave the 'update' variable as it. i.e. Just change:
>
> - int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
> + int uptodate = !bio->bi_error;
>
>
> I can't see any other problems with the md changes.
Thanks, I'll keep the local uptodate variable for now.
next prev parent reply other threads:[~2015-06-10 8:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 13:42 [RFC] add a bi_error field Christoph Hellwig
2015-06-03 13:42 ` [PATCH] block: add a bi_error field to struct bio Christoph Hellwig
2015-06-04 9:53 ` [dm-devel] " Martin K. Petersen
2015-06-04 15:31 ` Mike Snitzer
2015-06-10 8:11 ` Christoph Hellwig
2015-06-10 8:11 ` Christoph Hellwig
2015-06-10 15:26 ` Mike Snitzer
2015-06-10 15:26 ` Mike Snitzer
2015-06-10 16:01 ` Mike Snitzer
2015-06-10 16:04 ` Christoph Hellwig
2015-06-10 16:50 ` Mike Snitzer
2015-06-10 18:29 ` anup modak
2015-06-11 7:53 ` Christoph Hellwig
2015-06-11 7:59 ` Christoph Hellwig
2015-06-10 2:50 ` [dm-devel] [PATCH] " Neil Brown
2015-06-10 8:45 ` Christoph Hellwig [this message]
2015-06-11 7:59 ` [RFC] add a bi_error field Liu Bo
2015-06-11 8:05 ` Liu Bo
2015-06-11 8:08 ` Christoph Hellwig
2015-06-11 9:42 ` Liu Bo
-- strict thread matches above, loose matches on Subject: below --
2015-07-20 13:29 add a bi_error field to struct bio V3 Christoph Hellwig
2015-07-20 13:29 ` [PATCH] block: add a bi_error field to struct bio Christoph Hellwig
2015-07-21 8:19 ` [dm-devel] " Hannes Reinecke
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=20150610084553.GA5021@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.