tls: Split tls_sw_release_resources_rx
This patch splits tls_sw_release_resources_rx into two functions one which releases all inner software tls structures and another that also frees the containing structure. In TLS_DEVICE we will need to release the software structures without freeeing the containing structure, which contains other information. Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
dafb67f3bb
commit
39f56e1a78
@@ -1030,7 +1030,7 @@ void tls_sw_free_resources_tx(struct sock *sk)
|
||||
kfree(ctx);
|
||||
}
|
||||
|
||||
void tls_sw_free_resources_rx(struct sock *sk)
|
||||
void tls_sw_release_resources_rx(struct sock *sk)
|
||||
{
|
||||
struct tls_context *tls_ctx = tls_get_ctx(sk);
|
||||
struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
|
||||
@@ -1049,6 +1049,14 @@ void tls_sw_free_resources_rx(struct sock *sk)
|
||||
strp_done(&ctx->strp);
|
||||
lock_sock(sk);
|
||||
}
|
||||
}
|
||||
|
||||
void tls_sw_free_resources_rx(struct sock *sk)
|
||||
{
|
||||
struct tls_context *tls_ctx = tls_get_ctx(sk);
|
||||
struct tls_sw_context_rx *ctx = tls_sw_ctx_rx(tls_ctx);
|
||||
|
||||
tls_sw_release_resources_rx(sk);
|
||||
|
||||
kfree(ctx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user