public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Release chan lock upon sleeping
@ 2012-05-31 19:25 Gustavo Padovan
  2012-05-31 19:25 ` [PATCH 2/2] Bluetooth: Release all locks before sleep Gustavo Padovan
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo Padovan @ 2012-05-31 19:25 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Gustavo Padovan

From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>

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 <gustavo.padovan@collabora.co.uk>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-04 17:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 19:25 [PATCH 1/2] Bluetooth: Release chan lock upon sleeping Gustavo Padovan
2012-05-31 19:25 ` [PATCH 2/2] Bluetooth: Release all locks before sleep Gustavo Padovan
2012-06-04 17:14   ` Mat Martineau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox