mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
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: efca3878a5
("ch_ktls: Issue if connection offload fails")
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Link: https://lore.kernel.org/r/20201125072626.10861-1-rohitm@chelsio.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
025cc2fb6a
commit
cbf3d60329
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user