Skip to content

Commit cbf3d60

Browse files
rmchelsiokuba-moo
authored andcommitted
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: efca387 ("ch_ktls: Issue if connection offload fails") Signed-off-by: Rohit Maheshwari <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 025cc2f commit cbf3d60

File tree

1 file changed

+3
-1
lines changed
  • drivers/net/ethernet/chelsio/inline_crypto/ch_ktls

1 file changed

+3
-1
lines changed

drivers/net/ethernet/chelsio/inline_crypto/ch_ktls/chcr_ktls.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,9 @@ static int chcr_ktls_dev_add(struct net_device *netdev, struct sock *sk,
544544
/* need to wait for hw response, can't free tx_info yet. */
545545
if (tx_info->open_state == CH_KTLS_OPEN_PENDING)
546546
tx_info->pending_close = true;
547-
/* free the lock after the cleanup */
547+
else
548+
spin_unlock_bh(&tx_info->lock);
549+
/* if in pending close, free the lock after the cleanup */
548550
goto put_module;
549551
}
550552
spin_unlock_bh(&tx_info->lock);

0 commit comments

Comments
 (0)