]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
xfrm: add and use xfrm_state_afinfo_get_rcu
authorFlorian Westphal <fw@strlen.de>
Mon, 9 Jan 2017 13:20:48 +0000 (14:20 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Tue, 10 Jan 2017 09:57:13 +0000 (10:57 +0100)
commit711059b9752ad09ae6bcd4be8e48d30e5db483d8
tree3b8968687791bb4e12572b74309361509f71ab44
parentaf5d27c4e12b804c065c0e7c87507fea5683dab4
xfrm: add and use xfrm_state_afinfo_get_rcu

xfrm_init_tempstate is always called from within rcu read side section.
We can thus use a simpler function that doesn't call rcu_read_lock
again.

While at it, also make xfrm_init_tempstate return value void, the
return value was never tested.

A followup patch will replace remaining callers of xfrm_state_get_afinfo
with xfrm_state_afinfo_get_rcu variant and then remove the 'old'
get_afinfo interface.

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