Bluetooth: Add missing index added event on user channel failure
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/2 Bluetooth: Add missing index added event on user channel failure
When the setup of user channel fails, the index added event is not sent and will cause issues with user interaction. This problem can be easily triggered with a LE only controller without a public address. In that case hci_dev_open() fails and that error case is not sending an event saying that the controller is available for normal use again.
--- net/bluetooth/hci_sock.c | 1 + 1 file changed, 1 insertion(+)
net/bluetooth/hci_sock.c +1 -0
@@ -716,6 +716,7 @@ static int hci_sock_bind(struct socket *sock, struct sockaddr *addr, err =hci_dev_open (hdev->id);if (err) {clear_bit (HCI_USER_CHANNEL , &hdev->dev_flags); +mgmt_index_added (hdev);hci_dev_put (hdev); goto done; }
Signature · 1 line
1.8.5.3
Hi Marcel,
Quoted 10 lines · Marcel Holtmann
When the setup of user channel fails, the index added event is not sent and will cause issues with user interaction. This problem can be easily triggered with a LE only controller without a public address. In that case
hci_dev_open()fails and that error case is not sending an event saying that the controller is available for normal use again.Signed-off-by Marcel Holtmann <[email protected]>--- net/bluetooth/hci_sock.c | 1 + 1 file changed, 1 insertion(+)
Both patches have been applied to bluetooth-next. Thanks.
Johan