diff options
| author | Jeremy Dean Clifton <deaner92@yahoo.com> | 2026-11-17 02:33:43 +0000 |
|---|---|---|
| committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2026-11-17 11:39:03 -0500 |
| commit | 56abe5c17b4d7e3bdc83b9671549f407a7113ceb (patch) | |
| tree | ae54399b206a2885f1cf1978f2c85105f1ce24d9 /tools/perf/scripts/python | |
| parent | 1f150a0bb8a1a2302f6895ac410f0aaaaa63b756 (diff) | |
Bluetooth: hci_conn: Refuse new connections once HCI_UP is cleared
hci_dev_close_sync() clears HCI_UP and later calls hci_conn_hash_flush()
to delete every connection. A connection created by __hci_conn_add()
after the flush has run is never deleted. It keeps the hci_dev_hold()
reference and the sysfs device taken in __hci_conn_add(), so the
hci_dev is never freed, and its works can still be queued after the
workqueue is drained.
Check HCI_UP in __hci_conn_add(), which serves both hci_conn_add() and
hci_conn_add_unset(). All callers hold hdev->lock: the HCI event
handlers, create_pa_complete() in hci_sync.c, and the l2cap, sco, iso
and mgmt paths that reach the hci_connect_*() and hci_bind_*() helpers.
hci_conn_hash_flush() runs under hdev->lock too, so a connection is
either added before the flush and deleted by it, or refused.
Also include lockdep_assert_held() so the locking rule is checked.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jeremy Dean Clifton <deaner92@yahoo.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
