linux/net/bluetooth
Christian Eggers 0e8776b3d4 Bluetooth: HCI: Set extended advertising data synchronously
commit 89fb8acc38 upstream.

Currently, for controllers with extended advertising, the advertising
data is set in the asynchronous response handler for extended
adverstising params. As most advertising settings are performed in a
synchronous context, the (asynchronous) setting of the advertising data
is done too late (after enabling the advertising).

Move setting of adverstising data from asynchronous response handler
into synchronous context to fix ordering of HCI commands.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Fixes: a0fb3726ba ("Bluetooth: Use Set ext adv/scan rsp data if controller supports")
Cc: stable@vger.kernel.org
v2: https://lore.kernel.org/linux-bluetooth/20250626115209.17839-1-ceggers@arri.de/
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
[ Adapted DEFINE_FLEX macro usage to struct with flexible array member for compatibility with kernel 6.1. ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-07-24 08:51:55 +02:00
..
bnep Bluetooth: bnep: fix wild-memory-access in proto_unregister 2024-11-01 01:56:01 +01:00
cmtp Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
hidp Bluetooth: Fix race condition in hidp_session_thread 2023-04-20 12:35:06 +02:00
rfcomm Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" 2025-03-28 21:58:49 +01:00
6lowpan.c Bluetooth: Fix error code in chan_alloc_skb_cb() 2025-03-28 21:59:00 +01:00
a2mp.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
a2mp.h Bluetooth: Replace zero-length array with flexible-array member 2020-02-28 08:30:02 +01:00
af_bluetooth.c Revert "Bluetooth: af_bluetooth: Fix deadlock" 2024-11-17 15:07:19 +01:00
amp.c Bluetooth: amp: Use the correct print format 2021-06-26 07:12:41 +02:00
amp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 284 2019-06-05 17:36:37 +02:00
aosp.c Bluetooth: Fix null pointer deref on unexpected status event 2022-08-08 17:04:37 -07:00
aosp.h Bluetooth: aosp: Support AOSP Bluetooth Quality Report 2021-11-02 19:37:52 +01:00
ecdh_helper.c crypto: ecdh - move curve_id of ECDH from the key to algorithm name 2021-03-13 00:04:03 +11:00
ecdh_helper.h Fix misc new gcc warnings 2021-04-27 17:05:53 -07:00
eir.c Bluetooth: Fix NULL pointer deference on eir_get_service_data 2025-06-27 11:07:23 +01:00
eir.h Bluetooth: Add initial implementation of BIS connections 2022-07-22 17:13:56 -07:00
hci_codec.c Bluetooth: Fix support for Read Local Supported Codecs V2 2022-12-02 13:09:31 -08:00
hci_codec.h Bluetooth: Add support for Read Local Supported Codecs V2 2021-09-07 14:09:18 -07:00
hci_conn.c Revert "Bluetooth: hci_conn: Consolidate code for aborting connections" 2024-11-17 15:07:19 +01:00
hci_core.c Bluetooth: MGMT: Fix UAF on mgmt_remove_adv_monitor_complete 2025-06-27 11:07:21 +01:00
hci_debugfs.c Bluetooth: Fix TOCTOU in HCI debugfs implementation 2024-04-10 16:28:24 +02:00
hci_debugfs.h Bluetooth: hci_core: Move all debugfs handling to hci_debugfs.c 2021-09-22 16:17:13 +02:00
hci_event.c Bluetooth: HCI: Set extended advertising data synchronously 2025-07-24 08:51:55 +02:00
hci_request.c Bluetooth: Fix memory leak in hci_req_sync_complete() 2024-04-17 11:18:22 +02:00
hci_request.h Bluetooth: Delete unused hci_req_prepare_suspend() declaration 2023-10-10 22:00:40 +02:00
hci_sock.c Bluetooth: hci_sock: Fix not validating setsockopt user input 2024-10-17 15:21:33 +02:00
hci_sync.c Bluetooth: HCI: Set extended advertising data synchronously 2025-07-24 08:51:55 +02:00
hci_sysfs.c Bluetooth: fix use-after-free in device_for_each_child() 2024-12-14 19:53:34 +01:00
iso.c Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" 2025-03-28 21:58:49 +01:00
Kconfig Bluetooth: Add initial implementation of CIS connections 2022-07-22 17:13:22 -07:00
l2cap_core.c Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU 2025-07-24 08:51:53 +02:00
l2cap_sock.c Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() 2025-07-24 08:51:52 +02:00
leds.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
leds.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
lib.c Bluetooth: Fix EALREADY and ELOOP cases in bt_status() 2022-12-31 13:32:28 +01:00
Makefile Bluetooth: Add BTPROTO_ISO socket type 2022-07-22 17:13:39 -07:00
mgmt.c Bluetooth: MGMT: mesh_send: check instances prior disabling advertising 2025-07-10 15:59:44 +02:00
mgmt_config.c Bluetooth: mgmt: Use the correct print format 2021-06-26 07:12:42 +02:00
mgmt_config.h Bluetooth: mgmt: Add commands for runtime configuration 2020-06-18 13:11:03 +03:00
mgmt_util.c Bluetooth: MGMT: iterate over mesh commands in mgmt_mesh_foreach() 2025-06-27 11:07:11 +01:00
mgmt_util.h Bluetooth: Fix a buffer overflow in mgmt_mesh_add() 2023-02-01 08:34:21 +01:00
msft.c Bluetooth: msft: fix slab-use-after-free in msft_do_close() 2024-05-17 11:56:11 +02:00
msft.h Bluetooth: msft: fix slab-use-after-free in msft_do_close() 2024-05-17 11:56:11 +02:00
sco.c Revert "Bluetooth: hci_core: Fix sleeping function called from invalid context" 2025-03-28 21:58:49 +01:00
selftest.c crypto: ecdh - move curve_id of ECDH from the key to algorithm name 2021-03-13 00:04:03 +11:00
selftest.h Bluetooth: Add support for self testing framework 2014-12-30 08:53:55 +02:00
smp.c Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout 2025-07-24 08:51:52 +02:00
smp.h Bluetooth: SMP: If an unallowed command is received consider it a failure 2025-07-24 08:51:52 +02:00