diff options
author | Rohit Maheshwari <rohitm@chelsio.com> | 2020-04-23 12:18:55 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-04-23 15:51:37 -0700 |
commit | d97793af11e48161dee00fa877e34b65e7a20da9 (patch) | |
tree | 52e46182b2d544dd9c59cdd024a7d3115663c00b /drivers/crypto/chelsio | |
parent | f35d12971b4d814cdb2f659d76b42f0c545270b6 (diff) |
chcr: Fix CPU hard lockup
Soft lock should be taken in place of hard lock.
Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/crypto/chelsio')
-rw-r--r-- | drivers/crypto/chelsio/chcr_ktls.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/chelsio/chcr_ktls.c b/drivers/crypto/chelsio/chcr_ktls.c index cd1769ecdc1c..e92b352fb0ad 100644 --- a/drivers/crypto/chelsio/chcr_ktls.c +++ b/drivers/crypto/chelsio/chcr_ktls.c @@ -120,12 +120,10 @@ out: static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info, int new_state) { - unsigned long flags; - /* This function can be called from both rx (interrupt context) and tx * queue contexts. */ - spin_lock_irqsave(&tx_info->lock, flags); + spin_lock_bh(&tx_info->lock); switch (tx_info->connection_state) { case KTLS_CONN_CLOSED: tx_info->connection_state = new_state; @@ -169,7 +167,7 @@ static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info, pr_err("unknown KTLS connection state\n"); break; } - spin_unlock_irqrestore(&tx_info->lock, flags); + spin_unlock_bh(&tx_info->lock); return tx_info->connection_state; } |