zfsonlinux/zfs — pull request #1048 by behlendorf (2012-10-15 23:12:40+00:00)
Title: Condvar

Auditing the code to verify that all instances of cv_signal() and cv_broadcast()
are called under the proper associated mutex turned up several races. None
of these have been conclusively seen in the wild but the following patch set
resolves them.

For reference, from the cv_signal(9F) man page:

* cv_signal() signals the condition and wakes one blocked thread. All blocked threads
can be unblocked by calling cv_broadcast() . You must acquire the mutex passed
into cv_wait() before calling cv_signal() or cv_broadcast() .