mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Confirming Peter's fix (locking 101: release the lock before you go
to sleep). Locking 101, part 2: do not look at buffer contents after you have been asleep. There is no telling what wonderous changes may have occurred.
This commit is contained in:
parent
8dc799a226
commit
d7127837a2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=55931
@ -4566,8 +4566,6 @@ getdirtybuf(bpp, waitfor)
|
||||
FREE_LOCK_INTERLOCKED(&lk);
|
||||
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
|
||||
ACQUIRE_LOCK_INTERLOCKED(&lk);
|
||||
if (bp->b_xflags & BX_BKGRDINPROG)
|
||||
panic("getdirtybuf: still writing");
|
||||
continue;
|
||||
}
|
||||
if (waitfor != MNT_WAIT)
|
||||
|
@ -4566,8 +4566,6 @@ getdirtybuf(bpp, waitfor)
|
||||
FREE_LOCK_INTERLOCKED(&lk);
|
||||
tsleep(&bp->b_xflags, PRIBIO, "getbuf", 0);
|
||||
ACQUIRE_LOCK_INTERLOCKED(&lk);
|
||||
if (bp->b_xflags & BX_BKGRDINPROG)
|
||||
panic("getdirtybuf: still writing");
|
||||
continue;
|
||||
}
|
||||
if (waitfor != MNT_WAIT)
|
||||
|
Loading…
Reference in New Issue
Block a user