diff options
| author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-04-10 16:23:39 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-27 09:37:31 +0200 |
| commit | adfc12451123298bc583b9922f5182ae8cf70e59 (patch) | |
| tree | fd983f010b858362d22c5003b7887ec66d166bdc /net | |
| parent | 5e7171bf8db70e2f0de91d47e206bf2e0e7805cb (diff) | |
| download | linux-adfc12451123298bc583b9922f5182ae8cf70e59.tar.gz linux-adfc12451123298bc583b9922f5182ae8cf70e59.tar.bz2 linux-adfc12451123298bc583b9922f5182ae8cf70e59.zip | |
net/tls: fix build without CONFIG_TLS_DEVICE
[ Upstream commit 903f1a187776bb8d79b13618ec05b25f86318885 ]
buildbot noticed that TLS_HW is not defined if CONFIG_TLS_DEVICE=n.
Wrap the cleanup branch into an ifdef, tls_device_free_resources_tx()
wouldn't be compiled either in this case.
Fixes: 35b71a34ada6 ("net/tls: don't leak partially sent record in device mode")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
| -rw-r--r-- | net/tls/tls_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 8f3df7da99d9..96dbac91ac6e 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c @@ -298,8 +298,10 @@ static void tls_sk_proto_close(struct sock *sk, long timeout) kfree(ctx->tx.rec_seq); kfree(ctx->tx.iv); tls_sw_free_resources_tx(sk); +#ifdef CONFIG_TLS_DEVICE } else if (ctx->tx_conf == TLS_HW) { tls_device_free_resources_tx(sk); +#endif } if (ctx->rx_conf == TLS_SW) { |
