summaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorEric Dumazet2015-12-08 16:22:01 +0100
committerDavid S. Miller2015-12-12 01:22:06 +0100
commit56f047305dd4b6b61771ac4f523718e4111052a8 (patch)
tree05de0e01553b3040c009048ee446b849a3f697e1 /include/net/xfrm.h
parentnet: ezchip: fix address space confusion in nps_enet.c (diff)
downloadkernel-qcow2-linux-56f047305dd4b6b61771ac4f523718e4111052a8.tar.gz
kernel-qcow2-linux-56f047305dd4b6b61771ac4f523718e4111052a8.tar.xz
kernel-qcow2-linux-56f047305dd4b6b61771ac4f523718e4111052a8.zip
xfrm: add rcu grace period in xfrm_policy_destroy()
We will soon switch sk->sk_policy[] to RCU protection, as SYNACK packets are sent while listener socket is not locked. This patch simply adds RCU grace period before struct xfrm_policy freeing, and the corresponding rcu_head in struct xfrm_policy. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 4a9c21f9b4ea..8bae1ef647cd 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -548,6 +548,7 @@ struct xfrm_policy {
u16 family;
struct xfrm_sec_ctx *security;
struct xfrm_tmpl xfrm_vec[XFRM_MAX_DEPTH];
+ struct rcu_head rcu;
};
static inline struct net *xp_net(const struct xfrm_policy *xp)