Sleepable RCU
Sleepable RCU
Posted Jun 8, 2015 17:47 UTC (Mon) by PaulMcKenney (✭ supporter ✭, #9624)In reply to: Sleepable RCU by juihaochiang
Parent article: Sleepable RCU
Hello, Jui-Hao,
Suppose we have the following sequence of events:
- Task A does
srcu_read_lock()
and then picks up a pointer to an RCU -protected data element. - Task B removes that same data element from the list.
- (Task B is supposed to do
synchronize_srcu()
here, but let's assume that it fails to do so.) - Task B frees that data element—while Task A is still using it. Chaos ensues.
synchronize_srcu()
really is needed! Please do not leave it out.
Thanx, Paul