Message ID | 20240222174551.54413-2-bethany.jamison@canonical.com |
---|---|
State | New |
Headers | show |
Series | [SRU,Jammy,Focal,1/1] scsi: lpfc: Fix a possible data race in lpfc_unregister_fcf_rescan() | expand |
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c index 816fc406135b3..e01a5f30e4e5c 100644 --- a/drivers/scsi/lpfc/lpfc_hbadisc.c +++ b/drivers/scsi/lpfc/lpfc_hbadisc.c @@ -6967,7 +6967,9 @@ lpfc_unregister_fcf_rescan(struct lpfc_hba *phba) if (rc) return; /* Reset HBA FCF states after successful unregister FCF */ + spin_lock_irq(&phba->hbalock); phba->fcf.fcf_flag = 0; + spin_unlock_irq(&phba->hbalock); phba->fcf.current_rec.flag = 0; /*