Skip to content

Commit d97793a

Browse files
rmchelsiodavem330
authored andcommitted
chcr: Fix CPU hard lockup
Soft lock should be taken in place of hard lock. Signed-off-by: Rohit Maheshwari <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent f35d129 commit d97793a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/crypto/chelsio/chcr_ktls.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,10 @@ static int chcr_ktls_save_keys(struct chcr_ktls_info *tx_info,
120120
static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
121121
int new_state)
122122
{
123-
unsigned long flags;
124-
125123
/* This function can be called from both rx (interrupt context) and tx
126124
* queue contexts.
127125
*/
128-
spin_lock_irqsave(&tx_info->lock, flags);
126+
spin_lock_bh(&tx_info->lock);
129127
switch (tx_info->connection_state) {
130128
case KTLS_CONN_CLOSED:
131129
tx_info->connection_state = new_state;
@@ -169,7 +167,7 @@ static int chcr_ktls_update_connection_state(struct chcr_ktls_info *tx_info,
169167
pr_err("unknown KTLS connection state\n");
170168
break;
171169
}
172-
spin_unlock_irqrestore(&tx_info->lock, flags);
170+
spin_unlock_bh(&tx_info->lock);
173171

174172
return tx_info->connection_state;
175173
}

0 commit comments

Comments
 (0)