CID 375800: Concurrent data access violations in lib/isc/rwlock.c
Coverity Scan assumes that rwl->readers_waiting
should be accessed with a lock held as is done elsewhere 4 out of 5 times.
The following recent commits might be of interest:
*** CID 375800: Concurrent data access violations (MISSING_LOCK)
/lib/isc/rwlock.c: 104 in isc__rwlock_init()
98 rwl->magic = 0;
99
100 atomic_init(&rwl->spins, 0);
101 atomic_init(&rwl->write_requests, 0);
102 atomic_init(&rwl->write_completions, 0);
103 atomic_init(&rwl->cnt_and_flag, 0);
>>> CID 375800: Concurrent data access violations (MISSING_LOCK)
>>> Accessing "rwl->readers_waiting" without holding lock "isc_rwlock.lock". Elsewhere, "isc_rwlock.readers_waiting" is accessed with "isc_rwlock.lock" held 4 out of 5 times.
104 rwl->readers_waiting = 0;
105 atomic_init(&rwl->write_granted, 0);
106 if (read_quota != 0) {
107 UNEXPECTED_ERROR("read quota is not supported");
108 }
109 if (write_quota == 0) {