summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorBoris Pismenny <borisp@mellanox.com>2018-05-10 16:27:25 +0300
committerDavid S. Miller <davem@davemloft.net>2018-05-10 17:54:20 -0400
commit895262d85799fd4eaee84a89d024611b40330969 (patch)
treeb01307d03bf6ec0a6c1cb07c888d1990860ece0d /net/tls
parentb3c594ab6fcf7a91453442755deb1f3941eeed64 (diff)
downloadlinux-stable-895262d85799fd4eaee84a89d024611b40330969.tar.gz
linux-stable-895262d85799fd4eaee84a89d024611b40330969.tar.bz2
linux-stable-895262d85799fd4eaee84a89d024611b40330969.zip
tls: Fix tls_device initialization
Add sg table initialization to fix a BUG_ON encountered when enabling CONFIG_DEBUG_SG. Signed-off-by: Boris Pismenny <borisp@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_device.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c
index ac45d6224e41..a7a8f8e20ff3 100644
--- a/net/tls/tls_device.c
+++ b/net/tls/tls_device.c
@@ -604,6 +604,8 @@ int tls_set_device_offload(struct sock *sk, struct tls_context *ctx)
INIT_LIST_HEAD(&offload_ctx->records_list);
list_add_tail(&start_marker_record->list, &offload_ctx->records_list);
spin_lock_init(&offload_ctx->lock);
+ sg_init_table(offload_ctx->sg_tx_data,
+ ARRAY_SIZE(offload_ctx->sg_tx_data));
clean_acked_data_enable(inet_csk(sk), &tls_icsk_clean_acked);
ctx->push_pending_record = tls_device_push_pending_record;