Posted Jul 18, 2002 17:04 UTC (Thu) by corbet
In reply to: Race condition?
Parent article: Read-copy-update
In fact, there really isn't anything in the RCU patch to prevent multiple writers from working concurrently. Whoever updates the data pointer last wins. For the sorts of uses envisioned by the RCU authors (i.e. routing tables, loadable modules, etc.), this usually isn't a problem. There will not normally be concurrent writers, and especially not situations where one would depend on what the other is writing.
One certainly see situations where a write-side race condition would be a problem, though. The solution would be to put a spinlock around the copy-update part of the cycle.
to post comments)