summaryrefslogtreecommitdiff
path: root/COPYING
diff options
context:
space:
mode:
authorNiels Dossche <niels.dossche@ugent.be>2022-02-09 15:08:51 +0100
committerMarcel Holtmann <marcel@holtmann.org>2022-03-04 16:29:18 +0100
commit728abc0151b06b3cb1d084ca2ee7418c3fad89e2 (patch)
treee040c1775837fdb06785c1304cbb1e080cdefd14 /COPYING
parentf95fd5f364839ec48b18b80312ed86bf51908e56 (diff)
Bluetooth: hci_event: Add missing locking on hdev in hci_le_ext_adv_term_evt
Both hci_find_adv_instance and hci_remove_adv_instance have a comment above their function definition saying that these two functions require the caller to hold the hdev->lock lock. However, hci_le_ext_adv_term_evt does not acquire that lock and neither does its caller hci_le_meta_evt (hci_le_meta_evt calls hci_le_ext_adv_term_evt via an indirect function call because of the lookup in hci_le_ev_table). The other event handlers all acquire and release the hdev->lock and they follow the rule that hci_find_adv_instance and hci_remove_adv_instance must be called while holding the hdev->lock lock. The solution is to make sure hci_le_ext_adv_term_evt also acquires and releases the hdev->lock lock. The check on ev->status which logs a warning and does an early return is not covered by the lock because other functions also access ev->status without holding the lock. Signed-off-by: Niels Dossche <niels.dossche@ugent.be> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions