Skip to content

Commit

Permalink
tls: Fix tls_device initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Boris Pismenny authored and David S. Miller committed May 10, 2018
1 parent b3c594a commit 895262d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/tls/tls_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 895262d

Please sign in to comment.