Thread (3 messages) flat view 3 messages, 2 authors, 2012-06-04
STALE5211d

[PATCH 1/2] Bluetooth: Release chan lock upon sleeping

From: Gustavo Padovan <hidden>
Date: 2012-05-31 19:25:43
Subsystem: bluetooth subsystem, the rest · Maintainers: Marcel Holtmann, Luiz Augusto von Dentz, Linus Torvalds

From: Gustavo Padovan <redacted>

The lock must be released otherwise we block any other piece of the code
trying to lock the chan lock.

Signed-off-by: Gustavo Padovan <redacted>
---
 net/bluetooth/l2cap_core.c |    2 ++
 1 file changed, 2 insertions(+)
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 9750204..1cb3ca0 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1569,7 +1569,9 @@ int __l2cap_wait_ack(struct sock *sk)
 		}
 
 		release_sock(sk);
+		l2cap_chan_unlock(chan);
 		timeo = schedule_timeout(timeo);
+		l2cap_chan_lock(chan);
 		lock_sock(sk);
 		set_current_state(TASK_INTERRUPTIBLE);
 
-- 
1.7.10.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help