Re: [PATCH v2] Bluetooth: do not leak an hci_conn when a second LE connect is rejected
From: patchwork-bot+bluetooth
Date: Mon Aug 24 2026 - 12:54:02 EST
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:
On Mon, 24 Aug 2026 13:00:20 +0200 you wrote:
> create_le_conn_complete() decides whether the failed connection is
> still pending by comparing it against hci_lookup_le_connect(), which
> returns the first LE connection in BT_CONNECT. That is the same
> connection only while at most one is pending.
>
> Two can be pending. Connections created on the passive scan path sit
> in BT_CONNECT with HCI_CONN_SCANNING set and are invisible to
> hci_lookup_le_connect() until hci_le_create_conn_sync() clears the
> flag when their command is issued, so the -EBUSY guard in
> hci_connect_le() does not prevent a second connection from being
> queued while the first is still on the scan path. Whenever two
> connections are in BT_CONNECT at once, the lookup may return one
> connection while create_le_conn_complete() is reporting the failure
> of the other; the early exit then drops the error and hci_conn_failed()
> never runs on the connection that failed.
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: do not leak an hci_conn when a second LE connect is rejected
https://git.kernel.org/bluetooth/bluetooth-next/c/aadb3cd4bbb4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html