linux/include/net/bluetooth
Pavel Shpakovskiy 6bbd0d3f0c Bluetooth: hci_sync: fix set_local_name race condition
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>
2025-08-22 13:57:31 -04:00
..
bluetooth.h
coredump.h
hci.h
hci_core.h
hci_drv.h
hci_mon.h
hci_sock.h
hci_sync.h Bluetooth: hci_sync: fix set_local_name race condition 2025-08-22 13:57:31 -04:00
iso.h
l2cap.h
mgmt.h
rfcomm.h
sco.h