Bluetooth: hci_conn: Always allocate unique handles
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 28 Jun 2023 19:15:53 +0000 (12:15 -0700)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 11 Aug 2023 18:43:02 +0000 (11:43 -0700)
commit9f78191cc9f1b34c2e2afd7b554a83bf034092dd
treef00351059ed7f3f6aa45ea80163ed9b885ed2a26
parent04a51d616929eb96b7a3e547bc11d3bb46af2c9f
Bluetooth: hci_conn: Always allocate unique handles

This attempts to always allocate a unique handle for connections so they
can be properly aborted by the likes of hci_abort_conn, so this uses the
invalid range as a pool of unset handles that way if userspace is trying
to create multiple connections at once each will be given a unique
handle which will be considered unset.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c