Skip to contentSkip to conversation

bluetooth l2cap: fix locking in l2cap_global_chan_by_psm

PATCH In review Johannes Berg 2 participants 2 messages Jun 1, 2011 Bluetooth

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bluetooth l2cap: fix locking in l2cap_global_chan_by_psm

From: Johannes Berg <[email protected]>

read_lock() ... read_unlock_bh() is clearly bogus. This was broken by

commit 23691d75cdc69c3b285211b4d77746aa20a17d18

Author: Gustavo F. Padovan <[email protected]>
Date:   Wed Apr 27 18:26:32 2011 -0300

Bluetooth: Remove l2cap_sk_list

---
 net/bluetooth/l2cap_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/bluetooth/l2cap_core.c +1 -1
@@ -906,7 +906,7 @@ static struct l2cap_chan *l2cap_global_c
 		if (c->psm == psm) {
 			/* Exact match. */
 			if (!bacmp(&bt_sk(sk)->src, src)) {
-				read_unlock_bh(&chan_list_lock);
+				read_unlock(&chan_list_lock);
 				return c;
 			}
 
#1 lore raw
Quoted 5 lines · Johannes Berg

From: Johannes Berg <[email protected]>

read_lock() ... read_unlock_bh() is clearly bogus. This was broken by

Quoted 7 lines

commit 23691d75cdc69c3b285211b4d77746aa20a17d18

Author: Gustavo F. Padovan <[email protected]>
Date:   Wed Apr 27 18:26:32 2011 -0300

Bluetooth: Remove l2cap_sk_list

Gustavo, I'm taking this in wireless-2.6 directly.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.