MFC r273143: Remove setting BIO_DONE flag for BIOs that have done() method.

This fixes use-after-free, caused by geom_disk, completing same BIO twice
to save extra allocation, and getting BIO_DONE set after the first.
This commit is contained in:
mav 2014-10-19 08:47:27 +00:00
parent f2b9523abe
commit 7f2e56c17d

View File

@ -3585,10 +3585,8 @@ biodone(struct bio *bp)
bp->bio_flags |= BIO_DONE;
wakeup(bp);
mtx_unlock(mtxp);
} else {
bp->bio_flags |= BIO_DONE;
} else
done(bp);
}
}
/*