From: Johan Hedberg Date: Fri, 21 Feb 2014 14:03:31 +0000 (+0200) Subject: Bluetooth: Fix iterating wrong list in hci_remove_irk() X-Git-Tag: next-20140306~61^2~82 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=668b7b19820b0801c425d31cc27fd6f499050e5c;p=karo-tx-linux.git Bluetooth: Fix iterating wrong list in hci_remove_irk() 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 Signed-off-by: Gustavo Padovan --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 67192867c998..964aa8deb009 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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;