WSL2-Linux-Kernel/net/bluetooth
Johan Hedberg d06cc416f5 Bluetooth: Fix deadlock and crash when SMP pairing times out
The l2cap_conn_del function tries to cancel_sync the security timer, but
when it's called from the timeout function itself a deadlock occurs.
Subsequently the "hcon->l2cap_data = NULL" that's supposed to protect
multiple calls to l2cap_conn_del never gets cleared and when the
connection finally drops we double free's etc which will crash the
kernel.

This patch fixes the issue by using the HCI_CONN_LE_SMP_PEND for
protecting against this. The same flag is also used for the same purpose
in other places in the SMP code.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
2012-06-08 03:23:56 -03:00
..
bnep Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2012-05-22 15:18:06 -04:00
cmtp Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hidp HID: Create a common generic driver 2012-05-01 12:54:55 +02:00
rfcomm tty: Revert the tty locking series, it needs more work 2012-06-02 15:21:43 -07:00
Kconfig Bluetooth: Fix Kconfig help description 2012-02-29 18:50:25 +02:00
Makefile Bluetooth: Always compile SCO and L2CAP in Bluetooth Core 2011-12-21 02:21:08 -02:00
af_bluetooth.c Bluetooth: Fix checking the wrong flag when accepting a socket 2012-06-05 06:26:26 +03:00
hci_conn.c Bluetooth: Remove unused hci_le_ltk_neg_reply() 2012-05-09 01:40:51 -03:00
hci_core.c Bluetooth: Fix packet size provided to the controller 2012-05-16 16:12:49 -03:00
hci_event.c Bluetooth: Report proper error number in disconnection 2012-05-16 16:14:24 -03:00
hci_sock.c Merge branch 'x86-x32-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2012-03-29 18:12:23 -07:00
hci_sysfs.c Bluetooth: trivial: Correct types 2012-05-09 00:41:31 -03:00
l2cap_core.c Bluetooth: Fix deadlock and crash when SMP pairing times out 2012-06-08 03:23:56 -03:00
l2cap_sock.c Bluetooth: Create flags for bt_sk() 2012-05-16 16:14:17 -03:00
lib.c Bluetooth: Add logging functions bt_info and bt_err 2012-02-17 11:33:17 +02:00
mgmt.c Bluetooth: Fix LE pairing completion on connection failure 2012-06-08 02:50:57 -03:00
sco.c Bluetooth: Add dst_type parameter to hci_connect 2012-05-09 01:40:45 -03:00
smp.c Bluetooth: Fix SMP pairing method selection 2012-06-08 01:50:15 -03:00