summaryrefslogtreecommitdiff
path: root/include/linux/rculist_nulls.h
diff options
context:
space:
mode:
authorZhao Mengmeng <zhaomengmeng@kylinos.cn>2022-10-19 08:36:50 -0400
committerPaul E. McKenney <paulmck@kernel.org>2023-01-03 17:28:33 -0800
commitc004d231cac709f09987f2a6dd733013039d27c3 (patch)
tree8c9a5f2a5c57734a4e57128888a0f00b58783ddb /include/linux/rculist_nulls.h
parent1b929c02afd37871d5afb9d498426f83432e71c2 (diff)
rcu: Use hlist_nulls_next_rcu() in hlist_nulls_add_tail_rcu()
In commit 8dbd76e79a16 ("tcp/dccp: fix possible race __inet_lookup_established()"), function hlist_nulls_add_tail_rcu() was added back, but the local variable *last* is of type hlist_nulls_node, so use hlist_nulls_next_rcu() instead of hlist_next_rcu(). Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'include/linux/rculist_nulls.h')
-rw-r--r--include/linux/rculist_nulls.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rculist_nulls.h b/include/linux/rculist_nulls.h
index d8afdb8784c1..ba4c00dd8005 100644
--- a/include/linux/rculist_nulls.h
+++ b/include/linux/rculist_nulls.h
@@ -139,7 +139,7 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
if (last) {
n->next = last->next;
n->pprev = &last->next;
- rcu_assign_pointer(hlist_next_rcu(last), n);
+ rcu_assign_pointer(hlist_nulls_next_rcu(last), n);
} else {
hlist_nulls_add_head_rcu(n, h);
}