]> 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)
commit1cbacde98f55a36793cca95ab392d8ea5413d37a
tree5ca3eab87431eb437bf176260918513b8d9c1348
parenta8284e5992a11903ef229d93e783365d68b41d1a
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