linux/net/bluetooth
Tedd Ho-Jeong An ab944c83f6 Bluetooth: Reinitialize the list after deletion for session user list
If the user->list is deleted with list_del(), it doesn't initialize the
entry which can cause the issue with list_empty(). According to the
comment from the list.h, list_empty() returns false even if the list is
empty and put the entry in an undefined state.

/**
 * list_del - deletes entry from list.
 * @entry: the element to delete from the list.
 * Note: list_empty() on entry does not return true after this, the entry is
 * in an undefined state.
 */

Because of this behavior, list_empty() returns false even if list is empty
when the device is reconnected.

So, user->list needs to be re-initialized after list_del(). list.h already
have a macro list_del_init() which deletes the entry and initailze it again.

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
Tested-by: Jörg Otte <jrg.otte@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2015-06-30 21:46:19 +02:00
..
bnep net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
cmtp net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
hidp Bluetooth: hidp: Initialize list header of hidp session user 2015-06-26 20:00:21 +02:00
rfcomm Bluetooth: Fix potential NULL dereference in RFCOMM bind callback 2015-06-06 08:44:33 +02:00
6lowpan.c Bluetooth: 6lowpan: Fix module refcount 2015-06-17 19:17:58 +02:00
a2mp.c Bluetooth: Make __next_ident function static. 2015-02-15 10:14:54 +02:00
a2mp.h Bluetooth: Make __next_ident function static. 2015-02-15 10:14:54 +02:00
af_bluetooth.c Bluetooth: Convert mgmt to use HCI chan registration API 2015-03-06 20:15:21 +01:00
amp.c Bluetooth: Fix sparse warning in amp.c 2014-11-11 00:07:29 +01:00
amp.h Bluetooth: Move amp.h header file into net/bluetooth/ 2013-10-11 00:10:03 +02:00
ecc.c Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
ecc.h Bluetooth: Add ECC library for LE Secure Connections 2014-12-03 16:51:16 +01:00
hci_conn.c Bluetooth: Fix encryption key size handling for LTKs 2015-06-09 09:09:06 +02:00
hci_core.c Bluetooth: Use zalloc when possible 2015-06-18 21:00:06 +03:00
hci_debugfs.c Bluetooth: Expose current Device ID information via debugfs 2015-04-02 08:40:35 +03:00
hci_debugfs.h Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
hci_event.c Bluetooth: Remove redundant check for ACL_LINK 2015-06-12 12:07:20 +02:00
hci_request.c Bluetooth: Add second hci_request callback option for full skb 2015-04-02 16:09:27 +02:00
hci_request.h Bluetooth: Add second hci_request callback option for full skb 2015-04-02 16:09:27 +02:00
hci_sock.c Bluetooth: Fix race condition with user channel and setup stage 2015-06-08 11:04:49 +03:00
hci_sysfs.c Bluetooth: Convert to use ATTRIBUTE_GROUPS macro 2014-02-13 09:51:34 +02:00
Kconfig Bluetooth: Provide option to enable/disable debugfs information 2015-02-15 18:54:13 +02:00
l2cap_core.c Bluetooth: Reinitialize the list after deletion for session user list 2015-06-30 21:46:19 +02:00
l2cap_sock.c net: Pass kern from net_proto_family.create to sk_alloc 2015-05-11 10:50:17 -04:00
lib.c Bluetooth: Convert bt_<level> logging functions to return void 2014-09-24 09:40:08 +02:00
Makefile Bluetooth: Move SCO support under BT_BREDR config option 2015-06-09 13:41:36 +02:00
mgmt_util.c Bluetooth: Add generic mgmt helper API 2015-03-17 18:03:08 +01:00
mgmt_util.h Bluetooth: Add generic mgmt helper API 2015-03-17 18:03:08 +01:00
mgmt.c Bluetooth: Fix warning of potentially uninitialized adv_instance variable 2015-06-18 21:05:31 +03:00
sco.c Bluetooth: Make l2cap_recv_acldata() and sco_recv_scodata() return void 2015-06-09 13:41:36 +02:00
selftest.c Bluetooth: Export ECDH selftest result in debugfs 2015-04-02 08:47:38 +03:00
selftest.h Bluetooth: Add support for self testing framework 2014-12-30 08:53:55 +02:00
smp.c Bluetooth: Use actual encryption key size for SMP over BR/EDR 2015-06-12 11:38:45 +02:00
smp.h Bluetooth: Add function for generating LE SC out-of-band data 2015-03-16 10:31:27 +02:00