net: bluetooth: prevent multiple l2cap_chan_destroy calls
authorNagarjuna Kristam <nkristam@nvidia.com>
Tue, 19 Jun 2012 07:23:06 +0000 (12:23 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:12:29 +0000 (12:12 -0700)
commit698d7bfa6672f799e2076dd7b68595ffebd8fea6
tree603b6300a11a30a889c7dce6e40acb0862d4a67d
parent05e42e759d6f66ced5cd193c9f6d9583328c2c26
net: bluetooth: prevent multiple l2cap_chan_destroy calls

During l2cap channel disconnection, l2cap_chan_destroy is called twice,
when socket is released and when l2cap channel is closed. This causes
kernel panic.

add SOCK_DEAD check inside l2cap_sock_kill to prevent multiple
l2cap_chan_destroy function call

bug 1002888
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>

Change-Id: I1997ebe21351c034636f7133577a454a9e7bcedf
Reviewed-on: http://git-master/r/109731
Tested-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

Rebase-Id: Ra823d6000bb09141e129df3366b05dc36a54b5b5
net/bluetooth/l2cap_sock.c