.. | .. |
---|
1445 | 1445 | struct tipc_crypto *tx = tipc_net(net)->crypto_tx; |
---|
1446 | 1446 | struct tipc_key key; |
---|
1447 | 1447 | |
---|
1448 | | - spin_lock(&tx->lock); |
---|
| 1448 | + spin_lock_bh(&tx->lock); |
---|
1449 | 1449 | key = tx->key; |
---|
1450 | 1450 | WARN_ON(!key.active || tx_key != key.active); |
---|
1451 | 1451 | |
---|
1452 | 1452 | /* Free the active key */ |
---|
1453 | 1453 | tipc_crypto_key_set_state(tx, key.passive, 0, key.pending); |
---|
1454 | 1454 | tipc_crypto_key_detach(tx->aead[key.active], &tx->lock); |
---|
1455 | | - spin_unlock(&tx->lock); |
---|
| 1455 | + spin_unlock_bh(&tx->lock); |
---|
1456 | 1456 | |
---|
1457 | 1457 | pr_warn("%s: key is revoked\n", tx->name); |
---|
1458 | 1458 | return -EKEYREVOKED; |
---|
.. | .. |
---|
1964 | 1964 | |
---|
1965 | 1965 | skb_reset_network_header(*skb); |
---|
1966 | 1966 | 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; |
---|
1968 | 1969 | |
---|
1969 | 1970 | /* Validate TIPCv2 message */ |
---|
1970 | 1971 | if (unlikely(!tipc_msg_validate(skb))) { |
---|