Skip to content

Commit 3322443

Browse files
Yang Ligregkh
authored andcommitted
Bluetooth: hci_sync: Avoid adding default advertising on startup
[ Upstream commit de5d7d3 ] list_empty(&hdev->adv_instances) is always true during startup, so an advertising instance is added by default. Call trace: dump_backtrace+0x94/0xec show_stack+0x18/0x24 dump_stack_lvl+0x48/0x60 dump_stack+0x18/0x24 hci_setup_ext_adv_instance_sync+0x17c/0x328 hci_powered_update_adv_sync+0xb4/0x12c hci_powered_update_sync+0x54/0x70 hci_power_on_sync+0xe4/0x278 hci_set_powered_sync+0x28/0x34 set_powered_sync+0x40/0x58 hci_cmd_sync_work+0x94/0x100 process_one_work+0x168/0x444 worker_thread+0x378/0x3f4 kthread+0x108/0x10c ret_from_fork+0x10/0x20 Link: bluez/bluez#1442 Signed-off-by: Yang Li <yang.li@amlogic.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 47f69d1 commit 3322443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/bluetooth/hci_sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3344,7 +3344,7 @@ static int hci_powered_update_adv_sync(struct hci_dev *hdev)
33443344
* advertising data. This also applies to the case
33453345
* where BR/EDR was toggled during the AUTO_OFF phase.
33463346
*/
3347-
if (hci_dev_test_flag(hdev, HCI_ADVERTISING) ||
3347+
if (hci_dev_test_flag(hdev, HCI_ADVERTISING) &&
33483348
list_empty(&hdev->adv_instances)) {
33493349
if (ext_adv_capable(hdev)) {
33503350
err = hci_setup_ext_adv_instance_sync(hdev, 0x00);

0 commit comments

Comments
 (0)