--- x/net/bluetooth/mgmt.c +++ y/net/bluetooth/mgmt.c @@ -9359,7 +9359,9 @@ void mgmt_index_removed(struct hci_dev * if (test_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks)) return; + hci_dev_lock(hdev); mgmt_pending_foreach(0, hdev, cmd_complete_rsp, &match); + hci_dev_unlock(hdev); if (hci_dev_test_flag(hdev, HCI_UNCONFIGURED)) { mgmt_index_event(MGMT_EV_UNCONF_INDEX_REMOVED, hdev, NULL, 0,