Bluetooth: protect le accept and resolv lists with hdev->lock
authorNiels Dossche <dossche.niels@gmail.com>
Fri, 22 Apr 2022 22:31:17 +0000 (00:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:07 +0000 (16:35 +0200)
commit5781bb8a31910c2621cddeed739b99bfb0ddf1aa
tree3acc451b37cf7918a8ddbda605aa700a95db3a70
parent8a2dbdeccef6de47565638abdf3c25f41cdffc37
Bluetooth: protect le accept and resolv lists with hdev->lock

[ Upstream commit 5e2b6064cbc5fd582396768c5f9583f65085e368 ]

Concurrent operations from events on le_{accept,resolv}_list are
currently unprotected by hdev->lock.
Most existing code do already protect the lists with that lock.
This can be observed in hci_debugfs and hci_sync.
Add the protection for these events too.

Fixes: b950aa88638c ("Bluetooth: Add definitions and track LE resolve list modification")
Fixes: 0f36b589e4ee ("Bluetooth: Track LE white list modification via HCI commands")
Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_event.c