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:
parent
f2b9523abe
commit
7f2e56c17d
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user