diff options
author | David S. Miller <davem@davemloft.net> | 2015-05-09 15:51:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-09 15:51:00 -0400 |
commit | 0a801445db4cb00bc900fd89b1e5eb7d7b581d7e (patch) | |
tree | 4f51360cac0abfed65441bcf2165fc8ebe31a150 /net | |
parent | 31ccd0e66d41f73cfc21a8de976e713455205228 (diff) | |
parent | 89eb6d0677a6daf134015bc7bd5ec1432911eed2 (diff) |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 3 | ||||
-rw-r--r-- | net/mac802154/llsec.c | 4 | ||||
-rw-r--r-- | net/mac802154/main.c | 4 |
3 files changed, 7 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 476709bd068a..4663c3dad3f5 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1557,7 +1557,8 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
1557 | { | 1557 | { |
1558 | BT_DBG("%s %p", hdev->name, hdev); | 1558 | BT_DBG("%s %p", hdev->name, hdev); |
1559 | 1559 | ||
1560 | if (!hci_dev_test_flag(hdev, HCI_UNREGISTER)) { | 1560 | if (!hci_dev_test_flag(hdev, HCI_UNREGISTER) && |
1561 | test_bit(HCI_UP, &hdev->flags)) { | ||
1561 | /* Execute vendor specific shutdown routine */ | 1562 | /* Execute vendor specific shutdown routine */ |
1562 | if (hdev->shutdown) | 1563 | if (hdev->shutdown) |
1563 | hdev->shutdown(hdev); | 1564 | hdev->shutdown(hdev); |
diff --git a/net/mac802154/llsec.c b/net/mac802154/llsec.c index dcf73958133a..5b2be12832e6 100644 --- a/net/mac802154/llsec.c +++ b/net/mac802154/llsec.c | |||
@@ -134,7 +134,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template) | |||
134 | for (i = 0; i < ARRAY_SIZE(key->tfm); i++) { | 134 | for (i = 0; i < ARRAY_SIZE(key->tfm); i++) { |
135 | key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0, | 135 | key->tfm[i] = crypto_alloc_aead("ccm(aes)", 0, |
136 | CRYPTO_ALG_ASYNC); | 136 | CRYPTO_ALG_ASYNC); |
137 | if (!key->tfm[i]) | 137 | if (IS_ERR(key->tfm[i])) |
138 | goto err_tfm; | 138 | goto err_tfm; |
139 | if (crypto_aead_setkey(key->tfm[i], template->key, | 139 | if (crypto_aead_setkey(key->tfm[i], template->key, |
140 | IEEE802154_LLSEC_KEY_SIZE)) | 140 | IEEE802154_LLSEC_KEY_SIZE)) |
@@ -144,7 +144,7 @@ llsec_key_alloc(const struct ieee802154_llsec_key *template) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | key->tfm0 = crypto_alloc_blkcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC); | 146 | key->tfm0 = crypto_alloc_blkcipher("ctr(aes)", 0, CRYPTO_ALG_ASYNC); |
147 | if (!key->tfm0) | 147 | if (IS_ERR(key->tfm0)) |
148 | goto err_tfm; | 148 | goto err_tfm; |
149 | 149 | ||
150 | if (crypto_blkcipher_setkey(key->tfm0, template->key, | 150 | if (crypto_blkcipher_setkey(key->tfm0, template->key, |
diff --git a/net/mac802154/main.c b/net/mac802154/main.c index 68b9667323ec..08cb32dc8fd3 100644 --- a/net/mac802154/main.c +++ b/net/mac802154/main.c | |||
@@ -167,13 +167,15 @@ int ieee802154_register_hw(struct ieee802154_hw *hw) | |||
167 | if (IS_ERR(dev)) { | 167 | if (IS_ERR(dev)) { |
168 | rtnl_unlock(); | 168 | rtnl_unlock(); |
169 | rc = PTR_ERR(dev); | 169 | rc = PTR_ERR(dev); |
170 | goto out_wq; | 170 | goto out_phy; |
171 | } | 171 | } |
172 | 172 | ||
173 | rtnl_unlock(); | 173 | rtnl_unlock(); |
174 | 174 | ||
175 | return 0; | 175 | return 0; |
176 | 176 | ||
177 | out_phy: | ||
178 | wpan_phy_unregister(local->phy); | ||
177 | out_wq: | 179 | out_wq: |
178 | destroy_workqueue(local->workqueue); | 180 | destroy_workqueue(local->workqueue); |
179 | out: | 181 | out: |