summaryrefslogtreecommitdiff
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2010-04-08 16:23:32 -0700
committerColin Cross <ccross@android.com>2011-06-14 09:09:17 -0700
commitf86e4b09b7297ac880b88bb19e23661dfeeb47f7 (patch)
tree59e75c4f0d7c0f332b4edffe4d1be492ec1d426a /net/bluetooth/l2cap_core.c
parentc172849ed873e4785bdf9be18d5298427239f33a (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/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index e64a1c2df23..32f830acee6 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -620,7 +620,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;