Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a801445 authored by David S. Miller's avatar David S. Miller
Browse files


Johan Hedberg says:

====================
Here are a couple of important Bluetooth & mac802154 fixes for 4.1:

 - mac802154 fix for crypto algorithm allocation failure checking
 - mac802154 wpan phy leak fix for error code path
 - Fix for not calling Bluetooth shutdown() if interface is not up

Let me know if there are any issues pulling. Thanks.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 31ccd0e6 89eb6d06
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1557,7 +1557,8 @@ static int hci_dev_do_close(struct hci_dev *hdev)
{
{
	BT_DBG("%s %p", hdev->name, hdev);
	BT_DBG("%s %p", hdev->name, hdev);


	if (!hci_dev_test_flag(hdev, HCI_UNREGISTER)) {
	if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) &&
	    test_bit(HCI_UP, &hdev->flags)) {
		/* Execute vendor specific shutdown routine */
		/* Execute vendor specific shutdown routine */
		if (hdev->shutdown)
		if (hdev->shutdown)
			hdev->shutdown(hdev);
			hdev->shutdown(hdev);
+2 −2
Original line number Original line Diff line number Diff line
@@ -134,7 +134,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template)
	for (i = 0; i < ARRAY_SIZE(key->tfm); i++) {
	for (i = 0; i < ARRAY_SIZE(key->tfm); i++) {
		key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0,
		key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0,
						CRYPTO_ALG_ASYNC);
						CRYPTO_ALG_ASYNC);
		if (!key->tfm[i])
		if (IS_ERR(key->tfm[i]))
			goto err_tfm;
			goto err_tfm;
		if (crypto_aead_setkey(key->tfm[i], template->key,
		if (crypto_aead_setkey(key->tfm[i], template->key,
				       IEEE802154_LLSEC_KEY_SIZE))
				       IEEE802154_LLSEC_KEY_SIZE))
@@ -144,7 +144,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template)
	}
	}


	key->tfm0 = crypto_alloc_blkcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC);
	key->tfm0 = crypto_alloc_blkcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC);
	if (!key->tfm0)
	if (IS_ERR(key->tfm0))
		goto err_tfm;
		goto err_tfm;


	if (crypto_blkcipher_setkey(key->tfm0, template->key,
	if (crypto_blkcipher_setkey(key->tfm0, template->key,
+3 −1
Original line number Original line Diff line number Diff line
@@ -167,13 +167,15 @@ int ieee802154_register_hw(struct ieee802154_hw *hw)
	if (IS_ERR(dev)) {
	if (IS_ERR(dev)) {
		rtnl_unlock();
		rtnl_unlock();
		rc = PTR_ERR(dev);
		rc = PTR_ERR(dev);
		goto out_wq;
		goto out_phy;
	}
	}


	rtnl_unlock();
	rtnl_unlock();


	return 0;
	return 0;


out_phy:
	wpan_phy_unregister(local->phy);
out_wq:
out_wq:
	destroy_workqueue(local->workqueue);
	destroy_workqueue(local->workqueue);
out:
out: