1
0
Fork 0

xfrm: policy: use hlist rcu variants on inexact insert, part 2

This function was modeled on the 'exact' insert one, which did not use
the rcu variant either.

When I fixed the 'exact' insert I forgot to propagate this to my
development tree, so the inexact variant retained the bug.

Fixes: 9cf545ebd5 ("xfrm: policy: store inexact policies in a tree ordered by destination address")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
hifive-unleashed-5.1
Florian Westphal 2019-01-04 14:17:00 +01:00 committed by Steffen Klassert
parent 0977b2383d
commit 355b00d1e1
1 changed files with 2 additions and 2 deletions

View File

@ -856,9 +856,9 @@ static void xfrm_policy_inexact_list_reinsert(struct net *net,
}
if (newpos)
hlist_add_behind(&policy->bydst, newpos);
hlist_add_behind_rcu(&policy->bydst, newpos);
else
hlist_add_head(&policy->bydst, &n->hhead);
hlist_add_head_rcu(&policy->bydst, &n->hhead);
/* paranoia checks follow.
* Check that the reinserted policy matches at least