]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 29 Apr 2025 19:05:59 +0000 (15:05 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 12:12:15 +0000 (14:12 +0200)
commit31492b8386e5a243df26ca4a9421f6b041f414d5
treefa1bbe1d9bdc0eeb8993f7532f9ac19fbf186875
parentb8084e8135af70ce48ef4e256ea788ae13797ce8
Bluetooth: MGMT: Fix MGMT_OP_ADD_DEVICE invalid device flags

[ Upstream commit 1e2e3044c1bc64a64aa0eaf7c17f7832c26c9775 ]

Device flags could be updated in the meantime while MGMT_OP_ADD_DEVICE
is pending on hci_update_passive_scan_sync so instead of setting the
current_flags as cmd->user_data just do a lookup using
hci_conn_params_lookup and use the latest stored flags.

Fixes: a182d9c84f9c ("Bluetooth: MGMT: Fix Add Device to responding before completing")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/mgmt.c