summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-05-19 17:20:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-03 08:38:12 +0200
commit94e2701600ecc5505d4727d580c83b66ecc80ec7 (patch)
tree2d13a541799f7084995203bd73616ea50b472ddd /include/linux
parent938ffd6d2dd78fb83b9346c9b689e2a3a6fe7174 (diff)
scsi: libsas: Use _safe() loop in sas_resume_port()
[ Upstream commit 8c7e7b8486cda21269d393245883c5e4737d5ee7 ] 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: 303694eeee5e ("[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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions