hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/tipc/crypto.c
....@@ -1445,14 +1445,14 @@
14451445 struct tipc_crypto *tx = tipc_net(net)->crypto_tx;
14461446 struct tipc_key key;
14471447
1448
- spin_lock(&tx->lock);
1448
+ spin_lock_bh(&tx->lock);
14491449 key = tx->key;
14501450 WARN_ON(!key.active || tx_key != key.active);
14511451
14521452 /* Free the active key */
14531453 tipc_crypto_key_set_state(tx, key.passive, 0, key.pending);
14541454 tipc_crypto_key_detach(tx->aead[key.active], &tx->lock);
1455
- spin_unlock(&tx->lock);
1455
+ spin_unlock_bh(&tx->lock);
14561456
14571457 pr_warn("%s: key is revoked\n", tx->name);
14581458 return -EKEYREVOKED;
....@@ -1964,7 +1964,8 @@
19641964
19651965 skb_reset_network_header(*skb);
19661966 skb_pull(*skb, tipc_ehdr_size(ehdr));
1967
- pskb_trim(*skb, (*skb)->len - aead->authsize);
1967
+ if (pskb_trim(*skb, (*skb)->len - aead->authsize))
1968
+ goto free_skb;
19681969
19691970 /* Validate TIPCv2 message */
19701971 if (unlikely(!tipc_msg_validate(skb))) {