Bluetooth: Convert LTK list to RCU
This patch set converts the hdev->long_term_keys list to use RCU to eliminate the need to use hci_dev_lock/unlock. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:

committed by
Marcel Holtmann

parent
3e64b7bd82
commit
970d0f1b28
@@ -4578,8 +4578,8 @@ static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
||||
*/
|
||||
if (ltk->type == SMP_STK) {
|
||||
set_bit(HCI_CONN_STK_ENCRYPT, &conn->flags);
|
||||
list_del(<k->list);
|
||||
kfree(ltk);
|
||||
list_del_rcu(<k->list);
|
||||
kfree_rcu(ltk, rcu);
|
||||
} else {
|
||||
clear_bit(HCI_CONN_STK_ENCRYPT, &conn->flags);
|
||||
}
|
||||
|
Reference in New Issue
Block a user