Bluetooth: L2CAP: Fix invalid access on ECRED Connection response

[ Upstream commit de895b4393 ]

The use of l2cap_chan_del is not safe under a loop using
list_for_each_entry.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Luiz Augusto von Dentz 2021-05-19 13:41:51 -07:00 • committed by Greg Kroah-Hartman
commit 69ccde876c