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. MFC after: 1 week
This commit is contained in:
parent
632d4e706a
commit
99b9076c21
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=273143
@ -3618,10 +3618,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