bluetooth pull request for net:

- Fix deadlock when powering on.
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE7E6oRXp8w05ovYr/9JCA4xAyCykFAmLEnYMZHGx1aXoudm9u
 LmRlbnR6QGludGVsLmNvbQAKCRD0kIDjEDILKTzHD/9eWYA3Qg0Gq+GjKQd15KOH
 stiM8hrBsyoVgM/K7KP1cEuUFXLlg1NIg9tU/zw0S8j0tcJuw1iAF+FZ7uJHUrJ3
 NmD+jVe+wI2img+VoXu8D3pFMibjq6cde7/OAq8HrINtU1DY4HIO67YotDalrdRV
 7H2MIm14Wia1K5rpn3rMD3RryrN88fawW4B8y2vE492ovzSTLgJl5RP1mFbSG24/
 t8QN1kcvHdDAirHs8/2/s2uidY1T9wMRfG9eSBbrvgMHA/SKRDGuc6Ad19tFfNiW
 Mx4s9zMQT7PVjEy5uyy7phXam9xHLcvBN6QvsGFK8b67bEWsB6QZIAMVt5ikbwHm
 kN+yl0LEX+8/zkM/bBhOlroy3B1pSP2EmUzsyyLGe85lzglQKBcgWY23tzU3Bbrd
 Xs1hcFHdEJIj9cddh5s6m5bEw9nMdyCk6tRATx9Gyta5rUDGwtygBiLdEcIotel5
 V82FrPKFQoQi+v5hFmCIFkm6fHDt1Kb2DTcW/9n0TApanSGaauXXZsvmNm2EBE7B
 f2hnNlrTkAwiu2WhHkwvGctn5Yre3S1A16qE+o7b0u0T6CFKTtFkOSv3pr1lay6M
 lEvHz8XDOz+LNrcCB43u8ph+tBUFMTzrKtRWpEoCzlYlmKb/afHPhRasA17NikUE
 USOTAuNdcmfLqa5li2nbHw==
 =hm0v
 -----END PGP SIGNATURE-----

Merge tag 'for-net-2022-07-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Luiz Augusto von Dentz says:

====================
bluetooth pull request for net:

 - Fix deadlock when powering on.

* tag 'for-net-2022-07-05' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth:
  Bluetooth: core: Fix deadlock on hci_power_on_sync.
====================

Link: https://lore.kernel.org/r/20220705202700.1689796-1-luiz.dentz@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2022-07-05 14:42:09 -07:00
commit 26c12725b4
2 changed files with 3 additions and 1 deletions

View File

@ -571,6 +571,7 @@ int hci_dev_close(__u16 dev)
goto done;
}
cancel_work_sync(&hdev->power_on);
if (hci_dev_test_and_clear_flag(hdev, HCI_AUTO_OFF))
cancel_delayed_work(&hdev->power_off);
@ -2675,6 +2676,8 @@ void hci_unregister_dev(struct hci_dev *hdev)
list_del(&hdev->list);
write_unlock(&hci_dev_list_lock);
cancel_work_sync(&hdev->power_on);
hci_cmd_sync_clear(hdev);
if (!test_bit(HCI_QUIRK_NO_SUSPEND_NOTIFIER, &hdev->quirks))

View File

@ -4088,7 +4088,6 @@ int hci_dev_close_sync(struct hci_dev *hdev)
bt_dev_dbg(hdev, "");
cancel_work_sync(&hdev->power_on);
cancel_delayed_work(&hdev->power_off);
cancel_delayed_work(&hdev->ncmd_timer);