]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: hci_sync: Fix overwriting request callback
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 16 Feb 2024 21:20:11 +0000 (16:20 -0500)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:38 +0000 (18:19 -0400)
commit2af7aa6685e22d0dc546b0d27e5f16d3afe211fa
treecc90db3ff5acc89438d4c8e15f2ae940b9d4c001
parent0ce1229cbba6a3945ccc4e3162a81f97e21caa65
Bluetooth: hci_sync: Fix overwriting request callback

[ Upstream commit 2615fd9a7c2507eb3be3fbe49dcec88a2f56454a ]

In a few cases the stack may generate commands as responses to events
which would happen to overwrite the sent_cmd, so this attempts to store
the request in req_skb so even if sent_cmd is replaced with a new
command the pending request will remain in stored in req_skb.

Fixes: 6a98e3836fa2 ("Bluetooth: Add helper for serialized HCI command execution")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c
net/bluetooth/hci_sync.c