Skip to content

Commit

Permalink
Bluetooth: Fix crash when setting a LE socket to ready
Browse files Browse the repository at this point in the history
We should not try to do any other type of configuration for
LE links when they become ready.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
  • Loading branch information
Vinicius Costa Gomes authored and Gustavo F. Padovan committed Jun 20, 2011
1 parent a7925bd commit 6312845
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,11 +918,11 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)

bh_lock_sock(sk);

if (conn->hcon->type == LE_LINK)
if (conn->hcon->type == LE_LINK) {
if (smp_conn_security(conn, chan->sec_level))
l2cap_chan_ready(sk);

if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
} else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
__clear_chan_timer(chan);
l2cap_state_change(chan, BT_CONNECTED);
sk->sk_state_change(sk);
Expand Down

0 comments on commit 6312845

Please sign in to comment.