|
@@ -484,6 +484,13 @@ static inline void rcu_preempt_sleep_check(void)
|
|
* NULL. Although rcu_access_pointer() may also be used in cases where
|
|
* NULL. Although rcu_access_pointer() may also be used in cases where
|
|
* update-side locks prevent the value of the pointer from changing, you
|
|
* update-side locks prevent the value of the pointer from changing, you
|
|
* should instead use rcu_dereference_protected() for this use case.
|
|
* should instead use rcu_dereference_protected() for this use case.
|
|
|
|
+ *
|
|
|
|
+ * It is also permissible to use rcu_access_pointer() when read-side
|
|
|
|
+ * access to the pointer was removed at least one grace period ago, as
|
|
|
|
+ * is the case in the context of the RCU callback that is freeing up
|
|
|
|
+ * the data, or after a synchronize_rcu() returns. This can be useful
|
|
|
|
+ * when tearing down multi-linked structures after a grace period
|
|
|
|
+ * has elapsed.
|
|
*/
|
|
*/
|
|
#define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
|
|
#define rcu_access_pointer(p) __rcu_access_pointer((p), __rcu)
|
|
|
|
|