summaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/bin/stackcollapse-record
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2022-05-05 20:55:13 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2022-05-10 22:12:03 -0400
commit4a0f4aff3ce5a3efdf674f3bc1ba7d2642fa55ea (patch)
treedf5a922f2194a3a9c773adc0cb3bde1f3f2f611e /tools/perf/scripts/python/bin/stackcollapse-record
parent596fc8adb171dce3751a359018e2ade612af8d97 (diff)
downloadcachepc-linux-4a0f4aff3ce5a3efdf674f3bc1ba7d2642fa55ea.tar.gz
cachepc-linux-4a0f4aff3ce5a3efdf674f3bc1ba7d2642fa55ea.zip
scsi: lpfc: Use list_for_each_entry_safe() in rscn_recovery_check()
In GID_PT mode with lpfc_ns_query=1, a race condition between iterating the vport->fc_nodes list in lpfc_rscn_recovery_check() and cleanup of an ndlp can trigger a crash while processing the RSCN of another initiator from the same zone. During iteration of the vport->fc_nodes list, an ndlp is cleaned up and released. lpfc_dequeue_node() is called from lpfc_cleanup_node() leading to a bad ndlp dereference in lpfc_rscn_recovery_check(). Change list_for_each_entry() to list_for_each_entry_safe() in lpfc_rscn_recovery_check() to protect against removal of an initiator ndlp, while walking the vport->fc_nodes list. Link: https://lore.kernel.org/r/20220506035519.50908-7-jsmart2021@gmail.com Co-developed-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-record')
0 files changed, 0 insertions, 0 deletions