howeyc/fsnotify — pull request #98 by tilaks (2014-06-10 20:15:19+00:00)
Title: Fix data race on kevent buffer.

In the BSD implementation of fsnotify, the watcher's kbuf buffers a kevent
between syscall.SetKevent (which prepares the kevent) and syscall.Kevent
(which registers the kevent). The implementation intends to protect access to
kbuf, but fails to do so in addWatch and removeWatch.
This change fixes the data race by allocating a new kevent buffer for every
method invocation.