Skip to content

Commit 2a6fd83

Browse files
Zhao Mengmengchantra
authored andcommitted
rcu: use hlist_nulls_next_rcu() in hlist_nulls_add_tail_rcu()
In commit 8dbd76e ("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 <[email protected]>
1 parent 87e7989 commit 2a6fd83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/rculist_nulls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static inline void hlist_nulls_add_tail_rcu(struct hlist_nulls_node *n,
139139
if (last) {
140140
n->next = last->next;
141141
n->pprev = &last->next;
142-
rcu_assign_pointer(hlist_next_rcu(last), n);
142+
rcu_assign_pointer(hlist_nulls_next_rcu(last), n);
143143
} else {
144144
hlist_nulls_add_head_rcu(n, h);
145145
}

0 commit comments

Comments
 (0)