Files
twx-linux/drivers/scsi
Dan Carpenter b196cb8918 scsi: libsas: Use _safe() loop in sas_resume_port()
[ Upstream commit 8c7e7b8486 ]

If sas_notify_lldd_dev_found() fails then this code calls:

	sas_unregister_dev(port, dev);

which removes "dev", our list iterator, from the list.  This could lead to
an endless loop.  We need to use list_for_each_entry_safe().

Link: https://lore.kernel.org/r/YKUeq6gwfGcvvhty@mwanda
Fixes: 303694eeee ("[SCSI] libsas: suspend / resume support")
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-06-03 08:23:32 +02:00
..
2020-12-29 13:44:50 +01:00
2021-05-22 10:40:18 +02:00
2016-07-20 17:38:35 -06:00
2016-05-10 22:01:07 -04:00
2017-12-20 10:07:22 +01:00
2019-11-28 18:28:23 +01:00
2021-05-22 10:40:25 +02:00
2016-09-26 20:49:25 -04:00
2016-11-28 15:51:31 -05:00
2021-05-22 10:40:26 +02:00
2021-05-22 10:40:26 +02:00