|
|
Subscribe / Log in / New account

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:

  1. Task A does srcu_read_lock() and then picks up a pointer to an RCU -protected data element.
  2. Task B removes that same data element from the list.
  3. (Task B is supposed to do synchronize_srcu() here, but let's assume that it fails to do so.)
  4. Task B frees that data element—while Task A is still using it. Chaos ensues.
So that synchronize_srcu() really is needed! Please do not leave it out.

           Thanx, Paul


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds