xfrm: policy: only use rcu in xfrm_sk_policy_lookup
authorFlorian Westphal <fw@strlen.de>
Thu, 11 Aug 2016 13:17:57 +0000 (15:17 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 12 Aug 2016 06:07:12 +0000 (08:07 +0200)
commitae33786f73a7ce5b15ce29e8f342e43606385cef
tree93f389908cdcf2be4bce5ef90e322f7a4f19c394
parenta7c44247f704e385c77579d65c6ee6d002832529
xfrm: policy: only use rcu in xfrm_sk_policy_lookup

Don't acquire the readlock anymore and rely on rcu alone.

In case writer on other CPU changed policy at the wrong moment (after we
obtained sk policy pointer but before we could obtain the reference)
just repeat the lookup.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c