xfrm: introduce xfrm_trans_queue_net
authorSabrina Dubroca <sd@queasysnail.net>
Mon, 25 Nov 2019 13:48:58 +0000 (14:48 +0100)
committerSteffen Klassert <steffen.klassert@secunet.com>
Mon, 9 Dec 2019 08:59:07 +0000 (09:59 +0100)
commit7b3801927e52f8621de311277f7fc727635019e7
tree9d02419d2aa75fd8ac852aabb720abd2ae8075d7
parentb50b0580d27bc45a0637aefc8bac4d31aa85771a
xfrm: introduce xfrm_trans_queue_net

This will be used by TCP encapsulation to write packets to the encap
socket without holding the user socket's lock. Without this reinjection,
we're already holding the lock of the user socket, and then try to lock
the encap socket as well when we enqueue the encrypted packet.

While at it, add a BUILD_BUG_ON like we usually do for skb->cb, since
it's missing for struct xfrm_trans_cb.

Co-developed-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/net/xfrm.h
net/xfrm/xfrm_input.c