Changes to series and rx51_defconfig file for BFQ
[kernel-bfs] / kernel-bfs-2.6.28 / debian / patches / l2cap_parent.patch
1 From 62c3e306f2d9466f539679dd7357676b19fd5600 Mon Sep 17 00:00:00 2001
2 From: David Fries <david@fries.net>
3 Date: Sun, 6 Feb 2011 14:34:49 -0600
4 Subject: [PATCH] work around for l2cap NULL dereference in l2cap_conn_start
5
6 ---
7  net/bluetooth/l2cap.c |   10 ++++++++++
8  1 files changed, 10 insertions(+), 0 deletions(-)
9
10 diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
11 index ed83c1f..607ae21 100644
12 --- a/net/bluetooth/l2cap.c
13 +++ b/net/bluetooth/l2cap.c
14 @@ -408,6 +408,16 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
15                                         struct sock *parent = bt_sk(sk)->parent;
16                                         rsp.result = cpu_to_le16(L2CAP_CR_PEND);
17                                         rsp.status = cpu_to_le16(L2CAP_CS_AUTHOR_PEND);
18 +                                       if(!parent)
19 +                                       {
20 +                                               printk(KERN_DEBUG "avoided "
21 +                                                       "crash in %s parent %p "
22 +                                                       "result %d status %d\n",
23 +                                                       __func__, parent,
24 +                                                       rsp.result, rsp.status);
25 +                                               bh_unlock_sock(sk);
26 +                                               continue;
27 +                                       }
28                                         parent->sk_data_ready(parent, 0);
29  
30                                 } else {
31 -- 
32 1.7.2.3
33