diff options
author | Eric Dumazet <edumazet@google.com> | 2015-12-08 16:22:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-12 01:22:06 +0100 |
commit | d188ba86dd07a72ebebfa22fe9cb0b0572e57740 (patch) | |
tree | 3633c759d096b6fccc50e5641b1dcf8633a1dbf5 /include/net/sock.h | |
parent | xfrm: add rcu grace period in xfrm_policy_destroy() (diff) | |
download | linux-d188ba86dd07a72ebebfa22fe9cb0b0572e57740.tar.xz linux-d188ba86dd07a72ebebfa22fe9cb0b0572e57740.zip |
xfrm: add rcu protection to sk->sk_policy[]
XFRM can deal with SYNACK messages, sent while listener socket
is not locked. We add proper rcu protection to __xfrm_sk_clone_policy()
and xfrm_sk_policy_lookup()
This might serve as the first step to remove xfrm.xfrm_policy_lock
use in fast path.
Fixes: fa76ce7328b2 ("inet: get rid of central tcp/dccp listener timer")
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/sock.h')
-rw-r--r-- | include/net/sock.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index b1d475b5db68..eaef41433d7a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -388,7 +388,7 @@ struct sock { struct socket_wq *sk_wq_raw; }; #ifdef CONFIG_XFRM - struct xfrm_policy *sk_policy[2]; + struct xfrm_policy __rcu *sk_policy[2]; #endif struct dst_entry *sk_rx_dst; struct dst_entry __rcu *sk_dst_cache; |