Grab Giant in bufdonebio() since drivers may not hold it.
This only protects the "struct buf" consumers (ie: DEV_STRATEGY()), but does not protect BIO_STRATEGY() users.
This commit is contained in:
parent
a99de58f92
commit
4bfd22f25e
@ -3029,7 +3029,11 @@ bufwait(register struct buf * bp)
|
||||
void
|
||||
bufdonebio(struct bio *bp)
|
||||
{
|
||||
|
||||
/* Device drivers may or may not hold giant, hold it here. */
|
||||
mtx_lock(&Giant);
|
||||
bufdone(bp->bio_caller2);
|
||||
mtx_unlock(&Giant);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user