While going through the Unreliable guide to locking, I found this line
Deadlocks are problematic, but not as bad as data corruption. Code which grabs a read lock, searches a list, fails to find what it wants, drops the read lock, grabs a write lock and inserts the object has a race condition.
My problem is I don't see how. My understanding is that you cannot acquire a write lock before all others have dropped a read lock. In this case, code would acquire a write lock only when there are no readers currently accessing that area.