]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck...
authorIngo Molnar <mingo@kernel.org>
Sat, 25 Jan 2020 09:05:23 +0000 (10:05 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 25 Jan 2020 09:05:23 +0000 (10:05 +0100)
Pull RCU updates from Paul E. McKenney:

 - Expedited grace-period updates
 - kfree_rcu() updates
 - RCU list updates
 - Preemptible RCU updates
 - Torture-test updates
 - Miscellaneous fixes
 - Documentation updates

Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
.mailmap
include/linux/rculist_nulls.h

diff --cc .mailmap
Simple merge
index 61974c4c566be44af05531ce5b53040d586153a0,409a86bb5f25d613bd1258c00fa1c04c1d407949..e5b752027a031b119ce09a982b93f935c736c93d
@@@ -94,49 -102,12 +102,49 @@@ static inline void hlist_nulls_add_head
        struct hlist_nulls_node *first = h->first;
  
        n->next = first;
-       n->pprev = &h->first;
+       WRITE_ONCE(n->pprev, &h->first);
        rcu_assign_pointer(hlist_nulls_first_rcu(h), n);
        if (!is_a_nulls(first))
-               first->pprev = &n->next;
+               WRITE_ONCE(first->pprev, &n->next);
  }
  
 +/**
 + * hlist_nulls_add_tail_rcu
 + * @n: the element to add to the hash list.
 + * @h: the list to add to.
 + *
 + * Description:
 + * Adds the specified element to the specified hlist_nulls,
 + * while permitting racing traversals.
 + *
 + * The caller must take whatever precautions are necessary
 + * (such as holding appropriate locks) to avoid racing
 + * with another list-mutation primitive, such as hlist_nulls_add_head_rcu()
 + * or hlist_nulls_del_rcu(), running on this same list.
 + * However, it is perfectly legal to run concurrently with
 + * the _rcu list-traversal primitives, such as
 + * hlist_nulls_for_each_entry_rcu(), used to prevent memory-consistency
 + * problems on Alpha CPUs.  Regardless of the type of CPU, the
 + * list-traversal primitive must be guarded by rcu_read_lock().
 + */
 +static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
 +                                          struct hlist_nulls_head *h)
 +{
 +      struct hlist_nulls_node *i, *last = NULL;
 +
 +      /* Note: write side code, so rcu accessors are not needed. */
 +      for (i = h->first; !is_a_nulls(i); i = i->next)
 +              last = i;
 +
 +      if (last) {
 +              n->next = last->next;
 +              n->pprev = &last->next;
 +              rcu_assign_pointer(hlist_next_rcu(last), n);
 +      } else {
 +              hlist_nulls_add_head_rcu(n, h);
 +      }
 +}
 +
  /**
   * hlist_nulls_for_each_entry_rcu - iterate over rcu list of given type
   * @tpos:     the type * to use as a loop cursor.