]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: hci_core: fix list_for_each_entry_rcu usage
authorPauli Virtanen <pav@iki.fi>
Sat, 31 May 2025 15:24:58 +0000 (18:24 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jun 2025 13:32:24 +0000 (15:32 +0200)
commit99e3d698533964be7acb2e85cc5b29027f26efe4
tree2c77d8f5dbc3d41bd6e3cacfd9cec3308f877dab
parent3464a707d137efc8aea1d4ae234d26a28d82b78c
Bluetooth: hci_core: fix list_for_each_entry_rcu usage

[ Upstream commit 308a3a8ce8ea41b26c46169f3263e50f5997c28e ]

Releasing + re-acquiring RCU lock inside list_for_each_entry_rcu() loop
body is not correct.

Fix by taking the update-side hdev->lock instead.

Fixes: c7eaf80bfb0c ("Bluetooth: Fix hci_link_tx_to RCU lock usage")
Signed-off-by: Pauli Virtanen <pav@iki.fi>
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_core.c