linux/drivers/scsi/libsas
Dan Carpenter 8c7e7b8486 scsi: libsas: Use _safe() loop in sas_resume_port()
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>
2021-05-21 16:28:24 -04: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 misc on 20210428 2021-04-28 17:22:10 -07:00
sas_discover.c scsi: libsas: Clean up whitespace 2021-04-06 00:50:17 -04:00
sas_event.c scsi: libsas: Remove temporarily-added _gfp() API variants 2021-01-22 21:31:10 -05:00
sas_expander.c scsi: libsas: Clean up whitespace 2021-04-06 00:50:17 -04:00
sas_host_smp.c
sas_init.c scsi: libsas: Remove temporarily-added _gfp() API variants 2021-01-22 21:31:10 -05:00
sas_internal.h scsi: libsas: Remove temporarily-added _gfp() API variants 2021-01-22 21:31:10 -05:00
sas_phy.c
sas_port.c scsi: libsas: Use _safe() loop in sas_resume_port() 2021-05-21 16:28:24 -04: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