zephyr/subsys/bluetooth/host
Lingao Meng 2ef96e2f66 Bluetooth: Host: Fix unable cleanup conn
The peripheral is configured to update the connection
parameters for 5 seconds by default.

There is an abnormal situation with a very low probability.

The central actively disconnects or abnormally disconnects the
Bluetooth connection at the same time.

At this time, the connection disconnection event will be
handled by BT RX.

At this time, sysworkq has sent a parameter update request and
will receive a reply with status = 0x02, because the handle is
invalid at this time.

We can not just cancel work, because work->flag may be
in K_WORK_RUNNING, so work->flag is set to K_WORK_CANCELING
and subsequent conn_cleanup will unable call k_work_rescheduler
successfully.

According submit_to_queue_locked will return ret = -EBUSY.

	if (flag_test(&work->flags, K_WORK_CANCELING_BIT)) {
		/* Disallowed */
		ret = -EBUSY;
As a result, the connection cannot be cleanup correctly.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2022-04-29 15:35:10 +02:00
..
a2dp_internal.h
a2dp.c
addr.c
adv.c Bluetooth: hci: correct ext adv cmd definition 2022-04-20 15:49:54 +02:00
adv.h
aes_ccm.c
at.c
at.h
att_internal.h Bluetooth: Host: Make tx complete callback work for EATT channels 2022-04-24 19:46:41 +02:00
att.c Bluetooth: Host: Make tx complete callback work for EATT channels 2022-04-24 19:46:41 +02:00
avdtp_internal.h
avdtp.c Bluetooth: host: Optimize L2CAP resource usage 2022-04-07 09:37:12 +02:00
br.c Bluetooth: Host: Add ing to the bt_conn (dis)connect-ing state 2022-03-25 15:36:02 +01:00
br.h
buf.c
CMakeLists.txt
conn_internal.h Bluetooth: ISO: Add additional information for ISO streams 2022-04-26 11:35:45 +02:00
conn.c Bluetooth: Host: Fix unable cleanup conn 2022-04-29 15:35:10 +02:00
crypto.c Bluetooth: host: Introduce a new bt_hci_le_rand() call 2022-04-01 11:21:51 +02:00
crypto.h
direction_internal.h
direction.c everywhere: fix typos 2022-03-18 13:24:08 -04:00
ecc.c
ecc.h
gatt_internal.h
gatt.c Bluetooth: Host: Make tx complete callback work for EATT channels 2022-04-24 19:46:41 +02:00
hci_common.c
hci_core.c Bluetooth: host: Invert the logic to re-trigger the RX work queue 2022-04-12 09:53:33 +02:00
hci_core.h Bluetooth: host: Use a linked list instead of a FIFO as the RX queue 2022-04-12 09:53:33 +02:00
hci_ecc.c Bluetooth: Host: Add choice select whether BT RX 2022-04-11 10:58:09 +02:00
hci_ecc.h subsys/bluetooth/host: hci_core: Add a bt_disable command 2022-03-10 13:28:41 -05:00
hci_raw_internal.h
hci_raw.c
hfp_hf.c sys: util: Change return type of ARRAY_SIZE to size_t 2022-03-23 14:09:23 +01:00
hfp_internal.h everywhere: fix typos 2022-03-18 13:24:08 -04:00
id.c Bluetooth: Host: Validate IRK ID in range 2022-04-22 10:24:43 -05:00
id.h
iso_internal.h Bluetooth: ISO: Add named enum for bt_iso_state 2022-03-25 15:36:02 +01:00
iso.c Bluetooth: ISO: Add additional information for ISO streams 2022-04-26 11:35:45 +02:00
Kconfig Bluetooth: Kconfig: Increase TX stack size for BT_CTLR && BT_LL_SW_SPLIT 2022-04-22 09:43:12 +02:00
Kconfig.gatt Bluetooth: Host: Automatically create EATT channels on connection 2022-04-04 14:22:22 +02:00
Kconfig.l2cap Bluetooth: has: Add initial Hearing Access Service client 2022-04-07 09:37:53 +02:00
keys_br.c everywhere: fix typos 2022-03-18 13:24:08 -04:00
keys.c
keys.h
l2cap_br.c Bluetooth: Host: Add support for tx complete callback for ECRED channels 2022-04-24 19:46:41 +02:00
l2cap_internal.h Bluetooth: Host: Add support for tx complete callback for ECRED channels 2022-04-24 19:46:41 +02:00
l2cap.c Bluetooth: Host: Add support for tx complete callback for ECRED channels 2022-04-24 19:46:41 +02:00
monitor.c
monitor.h
rfcomm_internal.h
rfcomm.c Bluetooth: host: Move to l2cap_internal.h 2022-04-07 09:37:12 +02:00
scan.c Bluetooth: Host: Add ing to the bt_conn (dis)connect-ing state 2022-03-25 15:36:02 +01:00
scan.h
sdp_internal.h
sdp.c everywhere: fix typos 2022-03-18 13:24:08 -04:00
settings.c Bluetooth: Host: Implement dynamic apperance 2022-03-07 10:45:55 +01:00
settings.h
smp_null.c
smp.c Bluetooth: Host: Remove duplicated bt_auth callbacks 2022-03-25 15:17:18 -07:00
smp.h
ssp.c Bluetooth: Host: Remove duplicated bt_auth callbacks 2022-03-25 15:17:18 -07:00
ssp.h
testing.c
testing.h
uuid.c