Skip to content

Commit

Permalink
Bluetooth: Use list_for_each_entry_rcu() to traverse RCU list in RCU …
Browse files Browse the repository at this point in the history
…read-side CS

In function hci_is_blocked_key() RCU list is traversed with
list_for_each_entry() in RCU read-side CS.
Use list_for_each_entry_rcu() instead.

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Madhuparna Bhowmik authored and Marcel Holtmann committed Feb 28, 2020
1 parent d7d4168 commit 0c2ac7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ bool hci_is_blocked_key(struct hci_dev *hdev, u8 type, u8 val[16])
struct blocked_key *b;

rcu_read_lock();
list_for_each_entry(b, &hdev->blocked_keys, list) {
list_for_each_entry_rcu(b, &hdev->blocked_keys, list) {
if (b->type == type && !memcmp(b->val, val, sizeof(b->val))) {
blocked = true;
break;
Expand Down

0 comments on commit 0c2ac7d

Please sign in to comment.