mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-26 03:11:56 -05:00
A read lock could incorrectly be granted in some cases.
This commit is contained in:
parent
6c046c19a3
commit
3cab47dbea
1 changed files with 3 additions and 3 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: rwlock.c,v 1.21 2000/08/24 17:06:31 gson Exp $ */
|
||||
/* $Id: rwlock.c,v 1.22 2000/08/24 19:06:38 bwelling Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -121,9 +121,9 @@ isc_rwlock_lock(isc_rwlock_t *rwl, isc_rwlocktype_t type) {
|
|||
while (!done) {
|
||||
if (!skip &&
|
||||
((rwl->active == 0 ||
|
||||
rwl->writers_waiting == 0 ||
|
||||
(rwl->type == isc_rwlocktype_read &&
|
||||
rwl->granted < rwl->read_quota))))
|
||||
(rwl->writers_waiting == 0 ||
|
||||
rwl->granted < rwl->read_quota)))))
|
||||
{
|
||||
rwl->type = isc_rwlocktype_read;
|
||||
rwl->active++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue