Bluetooth: L2CAP: Fix invalid access if ECRED Reconfigure fails
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 19 May 2021 20:41:50 +0000 (13:41 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 26 Jun 2021 05:12:32 +0000 (07:12 +0200)
commit1fa20d7d4aad02206e84b74915819fbe9f81dab3
treea1e1277f8b18d361a44ab671e47d06325c84eaec
parent1c58e933aba23f68c0d3f192f7cc6eed8fabd694
Bluetooth: L2CAP: Fix invalid access if ECRED Reconfigure fails

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

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c