Unlock the right lock.

The adist_remote_lock is not held in this place, whereas the
adist_recv_list_lock lock is and is picked up during the next iteration.

I found this by annotating our libpthread with Clang's -Wthread-safety
attributes. I will send out a patch for this in the nearby future,
because it's awesome.

MFC after:	2 weeks
This commit is contained in:
Ed Schouten 2014-08-28 11:50:52 +00:00
parent 8b04bbef31
commit 4f6aec90ff
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=270749

View File

@ -643,7 +643,7 @@ recv_thread(void *arg __unused)
* we can use that.
*/
if (TAILQ_EMPTY(&adist_recv_list)) {
rw_unlock(&adist_remote_lock);
mtx_unlock(&adist_recv_list_lock);
continue;
}
mtx_unlock(&adist_recv_list_lock);