aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2015-03-11 02:55:51 -0400
committerMarcel Holtmann <marcel@holtmann.org>2015-03-11 03:52:32 -0400
commit87c8b28d291de9999e9da2ef5d4165861983eb83 (patch)
treed941295317ef4681019e0fda1f41a898dbbb86ba /net/bluetooth
parentbeb1c21b8ed4dc8aadead65885e89d60a727c54d (diff)
Bluetooth: Fix missing rcu_read_unlock() in hci_bdaddr_is_paired()
When finding a matching LTK the rcu_read_unlock() function was failing to release the RCU read lock. This patch adds the missing call to rcu_reaD_unlock(). Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a35d8441187a..4eba9d6fc9a5 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2535,8 +2535,10 @@ bool hci_bdaddr_is_paired(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 type)
2535 2535
2536 rcu_read_lock(); 2536 rcu_read_lock();
2537 list_for_each_entry_rcu(k, &hdev->long_term_keys, list) { 2537 list_for_each_entry_rcu(k, &hdev->long_term_keys, list) {
2538 if (k->bdaddr_type == addr_type && !bacmp(bdaddr, &k->bdaddr)) 2538 if (k->bdaddr_type == addr_type && !bacmp(bdaddr, &k->bdaddr)) {
2539 rcu_read_unlock();
2539 return true; 2540 return true;
2541 }
2540 } 2542 }
2541 rcu_read_unlock(); 2543 rcu_read_unlock();
2542 2544