> Just make sure you don't forget the history of completions... As
> Linus said long ago (
http://lwn.net/2001/0802/a/lt-completions.php3):
>
> In case anybody cares, the race was that Linux semaphores only protect the
> accesses _inside_ the semaphore, while the accesses by the semaphores
> themselves can "race" in the internal implementation. That helps make an
> efficient implementation, but it means that the race was:
>
> cpu #1 cpu #2
>
> DECLARE_MUTEX_LOCKED(sem);
> ..
> down(&sem); up(&sem);
> return;
> wake_up(&sem.wait) /*BOOM*/