]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: add rcu protection to sk->sk_policy[]
authorEric Dumazet <edumazet@google.com>
Tue, 8 Dec 2015 15:22:02 +0000 (07:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 00:22:06 +0000 (19:22 -0500)
commit6eb190975e75cc2cb620d73d4b0512d522d5f35c
tree3633c759d096b6fccc50e5641b1dcf8633a1dbf5
parent15d664f28dc7ac7bc5919c6d4932435e791ee92d
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: f9c74e4b8866 ("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>
include/net/sock.h
include/net/xfrm.h
net/core/sock.c
net/xfrm/xfrm_policy.c