Paul E. McKenney 5e1ee6e101 rcu: Note that rcu_access_pointer() can be used for teardown
There is no convenient expression for rcu_deference_protected()
when it is used in tearing down multilinked structures following
a grace period.  For example, suppose that an element containing an
RCU-protected pointer to a second element is removed from an enclosing
RCU-protected data structure, then the write-side lock is released,
and finally synchronize_rcu() is invoked to wait for a grace period.
Then it is necessary to traverse the pointer in order to free up the
second element.  But we are not in an RCU read-side critical section
and we are holding no locks, so the usual rcu_dereference_check() and
rcu_dereference_protected() primitives are not appropriate.  Neither
is rcu_dereference_raw(), as it is intended for use in data structures
where the user defines the locking design (for example, list_head).

So this responsibility is added to rcu_access_pointer()'s list, and
this commit updates rcu_assign_pointer()'s header comment accordingly.

Suggested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: David Howells <dhowells@redhat.com>
2012-02-21 09:03:46 -08:00
..
2012-01-22 15:08:43 -05:00
2012-01-10 16:30:42 -08:00
2012-01-12 20:13:04 -08:00
2012-01-12 20:13:08 -08:00
2012-01-09 13:52:09 +01:00
2012-01-12 20:13:11 -08:00
2012-01-17 15:40:51 -08:00
2012-01-12 20:13:10 -08:00
2012-01-12 15:23:04 -08:00
2012-02-21 09:03:43 -08:00
2012-01-09 09:33:57 +09:00
2012-01-24 12:25:14 -08:00