linux-yocto/include/net/bluetooth
Pavel Shpakovskiy 2651657f57 Bluetooth: hci_sync: fix set_local_name race condition
[ Upstream commit 6bbd0d3f0c23fc53c17409dd7476f38ae0ff0cd9 ]

Function set_name_sync() uses hdev->dev_name field to send
HCI_OP_WRITE_LOCAL_NAME command, but copying from data to hdev->dev_name
is called after mgmt cmd was queued, so it is possible that function
set_name_sync() will read old name value.

This change adds name as a parameter for function hci_update_name_sync()
to avoid race condition.

Fixes: 6f6ff38a1e ("Bluetooth: hci_sync: Convert MGMT_OP_SET_LOCAL_NAME")
Signed-off-by: Pavel Shpakovskiy <pashpakovskii@salutedevices.com>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-04 15:31:47 +02:00
..
bluetooth.h Bluetooth: SCO: Add support for 16 bits transparent voice setting 2024-12-19 18:13:20 +01:00
coredump.h
hci_core.h Bluetooth: hci_sync: fix double free in 'hci_discovery_filter_clear()' 2025-08-15 12:13:46 +02:00
hci_mon.h Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name 2023-10-13 20:06:33 -07:00
hci_sock.h Bluetooth: hci_core: Prefer struct_size over open coded arithmetic 2024-07-14 21:33:29 -04:00
hci_sync.h Bluetooth: hci_sync: fix set_local_name race condition 2025-09-04 15:31:47 +02:00
hci.h Bluetooth: hci_event: Mask data status from LE ext adv reports 2025-08-15 12:13:46 +02:00
iso.h
l2cap.h Bluetooth: L2CAP: Fix corrupted list in hci_chan_del 2025-03-22 12:54:28 -07:00
mgmt.h
rfcomm.h tty: rfcomm: prefer struct_size over open coded arithmetic 2024-07-14 21:33:31 -04:00
sco.h