aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-05-01 15:15:41 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-05-10 03:28:50 -0400
commit0ee0d20855ae9271de3f6695f4cafc08ab2533bb (patch)
tree2f3c1401a15d0b73b0ae21d527161972e5c773b3 /net/bluetooth
parentf6e6b16823de0aff31cb8ee8c098383e3aceec58 (diff)
Bluetooth: Fix crash when monitor timeout expires
The code was crashing due to a invalid access to hci_conn after the channel disconnect. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Reviewed-by: João Paulo Rechi Vita <jprvita@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 4c7b2d22faa5..2f9bbad42887 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -1568,6 +1568,9 @@ static struct sk_buff *l2cap_create_iframe_pdu(struct sock *sk, struct msghdr *m
1568 1568
1569 BT_DBG("sk %p len %d", sk, (int)len); 1569 BT_DBG("sk %p len %d", sk, (int)len);
1570 1570
1571 if (!conn)
1572 return ERR_PTR(-ENOTCONN);
1573
1571 if (sdulen) 1574 if (sdulen)
1572 hlen += 2; 1575 hlen += 2;
1573 1576