Commit ac7a47aa authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz Committed by Sasha Levin
Browse files

Bluetooth: hci_sync: Only allow hci_cmd_sync_queue if running

[ Upstream commit d883a466 ]

This makes sure hci_cmd_sync_queue only queue new work if HCI_RUNNING
has been set otherwise there is a risk of commands being sent while
turning off.

Because hci_cmd_sync_queue can no longer queue work while HCI_RUNNING is
not set it cannot be used to power on adapters so instead
hci_cmd_sync_submit is introduced which bypass the HCI_RUNNING check, so
it behaves like the old implementation.

Link: https://lore.kernel.org/all/CAB4PzUpDMvdc8j2MdeSAy1KkAE-D3woprCwAdYWeOc-3v3c9Sw@mail.gmail.com/


Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Stable-dep-of: 2615fd9a ("Bluetooth: hci_sync: Fix overwriting request callback")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1023de27
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment