linux/drivers/scsi/libsas
Dan Carpenter 988439906f 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 09:00:50 +02:00
..
Kconfig ata: make SATA_PMP option selectable only if any SATA host driver is enabled 2020-03-26 10:28:17 -06:00
Makefile
sas_ata.c scsi: libsas: Reset num_scatter if libata marks qc as NODATA 2021-04-21 13:00:55 +02:00
sas_discover.c SCSI misc on 20201013 2020-10-14 15:15:35 -07:00
sas_event.c scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_expander.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sas_host_smp.c
sas_init.c scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_internal.h scsi: libsas: Introduce a _gfp() variant of event notifiers 2021-03-25 09:04:11 +01:00
sas_phy.c
sas_port.c scsi: libsas: Use _safe() loop in sas_resume_port() 2021-06-03 09:00:50 +02:00
sas_scsi_host.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
sas_task.c scsi: libsas: Tidy SAS address print format 2019-12-21 13:42:42 -05:00