2013-01-31 23:12:10

by Andre Guedes

[permalink] [raw]
Subject: [PATCH] Bluetooth: Remove unneeded locking

This patch removes unneeded locking in hci_le_adv_report_evt. There
is no need to lock hdev before calling mgmt_device_found.

Signed-off-by: Andre Guedes <[email protected]>
---
net/bluetooth/hci_event.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index d4fcba6..06e7657 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3988,8 +3988,6 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)
void *ptr = &skb->data[1];
s8 rssi;

- hci_dev_lock(hdev);
-
while (num_reports--) {
struct hci_ev_le_advertising_info *ev = ptr;

@@ -3999,8 +3997,6 @@ static void hci_le_adv_report_evt(struct hci_dev *hdev, struct sk_buff *skb)

ptr += sizeof(*ev) + ev->length + 1;
}
-
- hci_dev_unlock(hdev);
}

static void hci_le_ltk_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
--
1.8.1.1



2013-02-01 17:23:45

by Gustavo Padovan

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: Remove unneeded locking

Hi Andre,

* Andre Guedes <[email protected]> [2013-01-31 20:12:10 -0300]:

> This patch removes unneeded locking in hci_le_adv_report_evt. There
> is no need to lock hdev before calling mgmt_device_found.
>
> Signed-off-by: Andre Guedes <[email protected]>
> ---
> net/bluetooth/hci_event.c | 4 ----
> 1 file changed, 4 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

Gustavo