Commit cbf3d603 authored by Rohit Maheshwari's avatar Rohit Maheshwari Committed by Jakub Kicinski

ch_ktls: lock is not freed

Currently lock gets freed only if timeout expires, but missed a
case when HW returns failure and goes for cleanup.

Fixes: efca3878 ("ch_ktls: Issue if connection offload fails")
Signed-off-by: default avatarRohit Maheshwari <rohitm@chelsio.com>
Link: https://lore.kernel.org/r/20201125072626.10861-1-rohitm@chelsio.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 025cc2fb
......@@ -544,7 +544,9 @@ static int chcr_ktls_dev_add(struct net_device *netdev, struct sock *sk,
/* need to wait for hw response, can't free tx_info yet. */
if (tx_info->open_state == CH_KTLS_OPEN_PENDING)
tx_info->pending_close = true;
/* free the lock after the cleanup */
else
spin_unlock_bh(&tx_info->lock);
/* if in pending close, free the lock after the cleanup */
goto put_module;
}
spin_unlock_bh(&tx_info->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment