Hard
RCU readers and a concurrently freed node
A kernel data structure is protected by RCU (Read-Copy-Update) instead of a lock: reads are extremely frequent, updates rare. A reader calls rcu_read_lock(), obtains a pointer to a node, and keeps using it for a while inside that read-side critical section. Concurrently, a writer unlinks that exact node from the structure and, after calling synchronize_rcu(), calls kfree() on it. What actually prevents the reader from dereferencing freed memory?
23 of 53 in Operating Systems