Bluetooth: Fix iterating wrong list in hci_remove_irk()
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 21 Feb 2014 14:03:31 +0000 (16:03 +0200)
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>
Fri, 21 Feb 2014 14:07:46 +0000 (11:07 -0300)
We should be iterating hdev->identity_resolving_keys in the
hci_remove_irk() function instead of hdev->long_term_keys. This patch
fixes the issue.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
net/bluetooth/hci_core.c

index 67192867c998f1fc1bf1704dd67ade368dc2f56e..964aa8deb0092af756d8eb163dfef5d42a2e56c8 100644 (file)
@@ -2937,7 +2937,7 @@ void hci_remove_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type)
 {
        struct smp_irk *k, *tmp;
 
-       list_for_each_entry_safe(k, tmp, &hdev->long_term_keys, list) {
+       list_for_each_entry_safe(k, tmp, &hdev->identity_resolving_keys, list) {
                if (bacmp(bdaddr, &k->bdaddr) || k->addr_type != addr_type)
                        continue;