mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
4a0f4aff3c
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> |
||
---|---|---|
.. | ||
lpfc_attr.c | ||
lpfc_attr.h | ||
lpfc_bsg.c | ||
lpfc_bsg.h | ||
lpfc_compat.h | ||
lpfc_crtn.h | ||
lpfc_ct.c | ||
lpfc_debugfs.c | ||
lpfc_debugfs.h | ||
lpfc_disc.h | ||
lpfc_els.c | ||
lpfc_hbadisc.c | ||
lpfc_hw4.h | ||
lpfc_hw.h | ||
lpfc_ids.h | ||
lpfc_init.c | ||
lpfc_logmsg.h | ||
lpfc_mbox.c | ||
lpfc_mem.c | ||
lpfc_nl.h | ||
lpfc_nportdisc.c | ||
lpfc_nvme.c | ||
lpfc_nvme.h | ||
lpfc_nvmet.c | ||
lpfc_scsi.c | ||
lpfc_scsi.h | ||
lpfc_sli4.h | ||
lpfc_sli.c | ||
lpfc_sli.h | ||
lpfc_version.h | ||
lpfc_vport.c | ||
lpfc_vport.h | ||
lpfc.h | ||
Makefile |