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. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html