mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
Bluetooth: hci_sync: add conditional locking annotations
Add context analysis annotations to functions doing conditional locking,
to suppress analysis warnings.
Fixes: cdc36db204 ("Bluetooth: hci_sync: Fix advertising data UAFs")
Tested-by: Nathan Chancellor <nathan@kernel.org> # build
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
3b8f8d6323
commit
5b9b68abb5
|
|
@ -1287,6 +1287,7 @@ hci_set_ext_adv_params_sync(struct hci_dev *hdev, u8 instance,
|
|||
}
|
||||
|
||||
static int hci_set_ext_adv_data_sync(struct hci_dev *hdev, u8 instance)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
DEFINE_FLEX(struct hci_cp_le_set_ext_adv_data, pdu, data, length,
|
||||
HCI_MAX_EXT_AD_LENGTH);
|
||||
|
|
@ -1375,6 +1376,7 @@ int hci_update_adv_data_sync(struct hci_dev *hdev, u8 instance)
|
|||
}
|
||||
|
||||
int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
struct hci_cp_le_set_ext_adv_params cp;
|
||||
struct hci_rp_le_set_ext_adv_params rp;
|
||||
|
|
@ -1535,6 +1537,7 @@ int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance)
|
|||
}
|
||||
|
||||
static int hci_set_ext_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
DEFINE_FLEX(struct hci_cp_le_set_ext_scan_rsp_data, pdu, data, length,
|
||||
HCI_MAX_EXT_AD_LENGTH);
|
||||
|
|
@ -1588,6 +1591,7 @@ static int hci_set_ext_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
|
|||
}
|
||||
|
||||
static int __hci_set_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
struct hci_cp_le_set_scan_rsp_data cp;
|
||||
u8 len;
|
||||
|
|
@ -1729,6 +1733,7 @@ static int hci_set_per_adv_params_sync(struct hci_dev *hdev, u8 instance,
|
|||
}
|
||||
|
||||
static int hci_set_per_adv_data_sync(struct hci_dev *hdev, u8 instance)
|
||||
__context_unsafe(/* conditional locking */)
|
||||
{
|
||||
DEFINE_FLEX(struct hci_cp_le_set_per_adv_data, pdu, data, length,
|
||||
HCI_MAX_PER_AD_LENGTH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user