Bluetooth: prevent multiple l2cap_sock_kill function calls
authorNagarjuna Kristam <nkristam@nvidia.com>
Wed, 25 Jul 2012 12:12:19 +0000 (17:12 +0530)
committerVarun Colbert <vcolbert@nvidia.com>
Sat, 4 Aug 2012 01:08:03 +0000 (18:08 -0700)
commit48314e4904ddb927c32eb88a2c89a200cf610de2
tree6edca4ba180518d8000c4aaa3dfb1274b8516d2f
parent50d9301e8e1b0fcad03906110374bb802d0cc3a3
Bluetooth: prevent multiple l2cap_sock_kill function calls

Remove SOCK_DEAD check inside l2cap_sock_kill, as this prevents cleanup of
l2cap sockets when bluetooth is turned off from UI
Instead of SOCK_DEAD check inside l2cap_sock_kill, add SOCK_DEAD check
inside l2cap_sock_close_cb to prevent multiple l2cap_sock_kill function calls.
This check avoids kernel panic, when l2cap_sock_close_cb function is called with
same socket multiple times.

Bug 1018499

Change-Id: I77388ffb1407138646feb9fbea467ca12e4a0855
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: http://git-master/r/118321
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
net/bluetooth/l2cap_sock.c