Following is the implementation of __list_add_rcu
in include/linux/rculist.h:
static inline void __list_add_rcu(struct list_head *new,
struct list_head *prev, struct list_head *next)
{
new->next = next;
new->prev = prev;
rcu_assign_pointer(list_next_rcu(prev), new);
next->prev = new;
}
Inside the function body, rcu-lock protects the update of prev->next
, but no protection on next->prev
. Why? Did I miss anything obvious here?