]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: clear the temporary linkkey in hci_conn_cleanup
authorAlain Michaud <alainm@chromium.org>
Thu, 2 Jun 2022 15:30:03 +0000 (15:30 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 22 Jul 2022 00:04:53 +0000 (17:04 -0700)
commit55ea64c26d44e661d825ba5ea8c77a0bc981a2d8
tree5ca3eab87431eb437bf176260918513b8d9c1348
parent0b24d99c0062b8f60db997f0fd54b10f9d10feff
Bluetooth: clear the temporary linkkey in hci_conn_cleanup

If a hardware error occurs and the connections are flushed without a
disconnection_complete event being signaled, the temporary linkkeys are
not flushed.

This change ensures that any outstanding flushable linkkeys are flushed
when the connection are flushed from the hash table.

Additionally, this also makes use of test_and_clear_bit to avoid
multiple attempts to delete the link key that's already been flushed.

Signed-off-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c