summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-04-08 16:23:32 -0700
committerGary King <gking@nvidia.com>2010-05-23 14:42:59 -0700
commit0c30695bb6148d117958f2b931acd2f3bea2e0b9 (patch)
tree481a5942c4832aa9d4ce11b4cffa8ca3fa19cc5c /net
parentccb4e22ef0deee7e66e2ef4787a9a9dacae08824 (diff)
Bluetooth: Hack: Don't dereference null pointer.
This avoids the S305 panic during incoming connection. S305 sends PSM 25 L2CAP connection request before the L2CAP info response. When we receive that info response we crash on null pointer here. Bug: 2127637 Change-Id: Ib637516251f46fa9a9c87ac015dc2f27df5a27fd Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 4529e99b2940..424712ca28ba 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -464,7 +464,8 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
struct sock *parent = bt_sk(sk)->parent;
rsp.result = cpu_to_le16(L2CAP_CR_PEND);
rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);
- parent->sk_data_ready(parent, 0);
+ if (parent)
+ parent->sk_data_ready(parent, 0);
} else {
sk->sk_state = BT_CONFIG;