From: bugzilla-daemon@kernel.org
To: linux-bluetooth@vger.kernel.org
Subject: [Bug 222359] New: Bluetooth: MGMT Set Public Address in the post-setup auto-off window succeeds but leaves the controller hidden with HCI_CONFIG set
Date: Thu, 03 Dec 2026 07:51:09 +0000 [thread overview]
Message-ID: <bug-222359-62941@https.bugzilla.kernel.org/> (raw)
https://bugzilla.kernel.org/show_bug.cgi?id=222359
Bug ID: 222359
Summary: Bluetooth: MGMT Set Public Address in the post-setup
auto-off window succeeds but leaves the controller
hidden with HCI_CONFIG set
Product: Drivers
Version: 2.5
Kernel Version: 7.3.7-2-cachyos
Hardware: AMD
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Bluetooth
Assignee: linux-bluetooth@vger.kernel.org
Reporter: bugzilla@accelocom.com
Regression: No
MGMT Set Public Address is accepted while the controller is in the post-setup
auto-off window (HCI_UP + HCI_AUTO_OFF), because hdev_is_powered() treats that
state as off. It reports success, but the address is never applied and the
index is never re-added, so the controller stays hidden from mgmt until the
driver is reloaded.
Why (mainline master as of 2026-12-02):
1. set_public_address() calls mgmt_index_removed(), sets HCI_CONFIG and
HCI_AUTO_OFF, and queues power_on.
2. hci_power_on() takes its HCI_UP && HCI_MGMT && HCI_AUTO_OFF fast path:
hci_powered_update_sync(), then return.
3. So hci_dev_do_open() never runs (set_bdaddr is never called), HCI_CONFIG is
never cleared, and mgmt_index_added() is never called.
Observed (hit at boot by a systemd unit running btmgmt public-addr before
bluetoothd started): the command returns success; btmgmt info then lists 0
indexes; hci0 is UP and RUNNING with HCI_CONFIG set, bdaddr still the old
address and public_addr the new one (read with bpftrace). Reloading btusb
recovers Bluetooth functionality. The same command works when the controller is
fully closed.
To reproduce (worked out from the above, not yet run as a standalone test):
stop bluetoothd, reload btusb, and within 2 seconds of hci0 appearing run
"btmgmt --index 0 public-addr <addr>".
Possible fixes: reject in set_public_address() whenever HCI_UP is set, or skip
the hci_power_on() fast path when HCI_CONFIG is set.
Environment: MediaTek MT7927 (btusb + btmtk), kernel 7.3.7-2-cachyos, BlueZ
5.88.
--
You are receiving this mail because:
You are the assignee for the bug.
reply other threads:[~2026-12-03 7:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-222359-62941@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox