commit | cf6d43ef66f416282121f436ce1bee9a25199d52 | [log] [tgz] |
---|---|---|
author | Sabrina Dubroca <sd@queasysnail.net> | Tue Jan 16 16:04:26 2018 +0100 |
committer | David S. Miller <davem@davemloft.net> | Wed Jan 17 16:16:03 2018 -0500 |
tree | 0e2e7f8c15b36422f69874435375d3445688893f | |
parent | 6ab6dd9e7f18dea51a6d65c0c28f0fd74332bfe6 [diff] |
tls: fix sw_ctx leak During setsockopt(SOL_TCP, TLS_TX), if initialization of the software context fails in tls_set_sw_offload(), we leak sw_ctx. We also don't reassign ctx->priv_ctx to NULL, so we can't even do another attempt to set it up on the same socket, as it will fail with -EEXIST. Fixes: 3c4d7559159b ('tls: kernel TLS support') Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net>