Skip to content

Commit

Permalink
rcu: use hlist_nulls_next_rcu() in hlist_nulls_add_tail_rcu()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Zhao Mengmeng authored and chantra committed Oct 19, 2022
1 parent da314e0 commit e25af8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/rculist_nulls.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit e25af8d

Please sign in to comment.