Bluetooth: prevent multiple l2cap_sock_kill function calls
authorNagarjuna Kristam <nkristam@nvidia.com>
Wed, 25 Jul 2012 12:12:19 +0000 (17:12 +0530)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:14:59 +0000 (12:14 -0700)
commita2ae0f169df1334aee2e33a2ba8b4681600855ca
tree430324d5fe0950b27666ace2ab822102d3ad8036
parente137d593c30189d7a4ae186d8e0102ab6140151b
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>

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