Thread (34 messages) 34 messages, 4 authors, 2012-01-26

[RFC 05/22] Bluetooth: hci_conn_auto_accept() doesn't need locking

From: Gustavo F. Padovan <hidden>
Date: 2011-12-17 21:29:25
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

From: "Gustavo F. Padovan" <redacted>

It doesn't really touch any sensitive information about hdev. So no need
to lock here.

Signed-off-by: Gustavo F. Padovan <redacted>
---
 net/bluetooth/hci_conn.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 7d88a61..e6d8a22 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -362,12 +362,8 @@ static void hci_conn_auto_accept(unsigned long arg)
 	struct hci_conn *conn = (void *) arg;
 	struct hci_dev *hdev = conn->hdev;
 
-	hci_dev_lock(hdev);
-
 	hci_send_cmd(hdev, HCI_OP_USER_CONFIRM_REPLY, sizeof(conn->dst),
 								&conn->dst);
-
-	hci_dev_unlock(hdev);
 }
 
 struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst)
-- 
1.7.6.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help