linux-stable/net/bluetooth
Zijun Hu 1924494a52 Bluetooth: hci_sock: Reset cookie to zero in hci_sock_free_cookie()
[ Upstream commit 4d7936e8a5 ]

Reset cookie value to 0 instead of 0xffffffff in hci_sock_free_cookie()
since:
0         :  means cookie has not been assigned yet
0xffffffff:  means cookie assignment failure

Also fix generating cookie failure with usage shown below:
hci_sock_gen_cookie(sk)   // generate cookie
hci_sock_free_cookie(sk)  // free cookie
hci_sock_gen_cookie(sk)   // Can't generate cookie any more

Signed-off-by: Zijun Hu <zijun.hu@oss.qualcomm.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-20 18:36:01 +02:00
..
bnep
cmtp
hidp
rfcomm
6lowpan.c
af_bluetooth.c
aosp.c
aosp.h
coredump.c Bluetooth: hci_devcd_dump: fix out-of-bounds via dev_coredumpv 2025-08-15 12:16:34 +02:00
ecdh_helper.c
ecdh_helper.h
eir.c Bluetooth: eir: Fix possible crashes on eir_create_adv_data 2025-06-19 15:40:57 +02:00
eir.h Bluetooth: eir: Fix possible crashes on eir_create_adv_data 2025-06-19 15:40:57 +02:00
hci_codec.c
hci_codec.h
hci_conn.c Bluetooth: hci_event: Add support for handling LE BIG Sync Lost event 2025-08-20 18:36:01 +02:00
hci_core.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-24 08:58:37 +02:00
hci_debugfs.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-24 08:58:37 +02:00
hci_debugfs.h
hci_event.c Bluetooth: hci_event: Add support for handling LE BIG Sync Lost event 2025-08-20 18:36:01 +02:00
hci_sock.c Bluetooth: hci_sock: Reset cookie to zero in hci_sock_free_cookie() 2025-08-20 18:36:01 +02:00
hci_sync.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-24 08:58:37 +02:00
hci_sysfs.c
iso.c Bluetooth: separate CIS_LINK and BIS_LINK link types 2025-06-19 15:39:57 +02:00
Kconfig
l2cap_core.c Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU 2025-07-24 08:58:39 +02:00
l2cap_sock.c Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() 2025-07-24 08:58:37 +02:00
leds.c
leds.h
lib.c
Makefile
mgmt_config.c
mgmt_config.h
mgmt_util.c Bluetooth: MGMT: Protect mgmt_pending list with its own lock 2025-06-19 15:40:52 +02:00
mgmt_util.h Bluetooth: MGMT: Protect mgmt_pending list with its own lock 2025-06-19 15:40:52 +02:00
mgmt.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-24 08:58:37 +02:00
msft.c Bluetooth: hci_dev: replace 'quirks' integer by 'quirk_flags' bitmap 2025-07-24 08:58:37 +02:00
msft.h
sco.c
selftest.c
selftest.h
smp.c Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout 2025-07-24 08:58:37 +02:00
smp.h Bluetooth: SMP: If an unallowed command is received consider it a failure 2025-07-24 08:58:37 +02:00