diff options
author | James Smart <james.smart@emulex.com> | 2010-10-22 11:06:56 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-10-26 11:42:27 -0400 |
commit | 5989b8d4dc0367a8c07cd1545dbad590a6de989d (patch) | |
tree | bb74cf25232c61538a499e7a5d5624a54a0b67a8 /drivers/scsi/lpfc/lpfc_scsi.c | |
parent | 5af5eee7ca4051d8ca31edeb5216831da9625b5c (diff) |
[SCSI] lpfc 8.3.18: Fix critical errors
Fix critical errors
- Update send_scsi_event to validate pnode pointer active before copying
the wwpn information.
- Add a message, mailbox_idle, and unlock before failing SECURITY_MGMT
or AUTH_PORT mailbox commands
- Prevent spin_lock_irqsave from being called twice in a row.
Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 3a658953486c..f64b65a770b8 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -169,6 +169,7 @@ lpfc_update_stats(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
169 | spin_lock_irqsave(shost->host_lock, flags); | 169 | spin_lock_irqsave(shost->host_lock, flags); |
170 | if (!vport->stat_data_enabled || | 170 | if (!vport->stat_data_enabled || |
171 | vport->stat_data_blocked || | 171 | vport->stat_data_blocked || |
172 | !pnode || | ||
172 | !pnode->lat_data || | 173 | !pnode->lat_data || |
173 | (phba->bucket_type == LPFC_NO_BUCKET)) { | 174 | (phba->bucket_type == LPFC_NO_BUCKET)) { |
174 | spin_unlock_irqrestore(shost->host_lock, flags); | 175 | spin_unlock_irqrestore(shost->host_lock, flags); |
@@ -2040,6 +2041,9 @@ lpfc_send_scsi_error_event(struct lpfc_hba *phba, struct lpfc_vport *vport, | |||
2040 | struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; | 2041 | struct lpfc_nodelist *pnode = lpfc_cmd->rdata->pnode; |
2041 | unsigned long flags; | 2042 | unsigned long flags; |
2042 | 2043 | ||
2044 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) | ||
2045 | return; | ||
2046 | |||
2043 | /* If there is queuefull or busy condition send a scsi event */ | 2047 | /* If there is queuefull or busy condition send a scsi event */ |
2044 | if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || | 2048 | if ((cmnd->result == SAM_STAT_TASK_SET_FULL) || |
2045 | (cmnd->result == SAM_STAT_BUSY)) { | 2049 | (cmnd->result == SAM_STAT_BUSY)) { |
@@ -3226,10 +3230,11 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
3226 | struct lpfc_scsi_buf *lpfc_cmd; | 3230 | struct lpfc_scsi_buf *lpfc_cmd; |
3227 | struct lpfc_iocbq *iocbq; | 3231 | struct lpfc_iocbq *iocbq; |
3228 | struct lpfc_iocbq *iocbqrsp; | 3232 | struct lpfc_iocbq *iocbqrsp; |
3233 | struct lpfc_nodelist *pnode = rdata->pnode; | ||
3229 | int ret; | 3234 | int ret; |
3230 | int status; | 3235 | int status; |
3231 | 3236 | ||
3232 | if (!rdata->pnode || !NLP_CHK_NODE_ACT(rdata->pnode)) | 3237 | if (!pnode || !NLP_CHK_NODE_ACT(pnode)) |
3233 | return FAILED; | 3238 | return FAILED; |
3234 | 3239 | ||
3235 | lpfc_cmd = lpfc_get_scsi_buf(phba); | 3240 | lpfc_cmd = lpfc_get_scsi_buf(phba); |
@@ -3256,7 +3261,7 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata, | |||
3256 | "0702 Issue %s to TGT %d LUN %d " | 3261 | "0702 Issue %s to TGT %d LUN %d " |
3257 | "rpi x%x nlp_flag x%x\n", | 3262 | "rpi x%x nlp_flag x%x\n", |
3258 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, | 3263 | lpfc_taskmgmt_name(task_mgmt_cmd), tgt_id, lun_id, |
3259 | rdata->pnode->nlp_rpi, rdata->pnode->nlp_flag); | 3264 | pnode->nlp_rpi, pnode->nlp_flag); |
3260 | 3265 | ||
3261 | status = lpfc_sli_issue_iocb_wait(phba, LPFC_FCP_RING, | 3266 | status = lpfc_sli_issue_iocb_wait(phba, LPFC_FCP_RING, |
3262 | iocbq, iocbqrsp, lpfc_cmd->timeout); | 3267 | iocbq, iocbqrsp, lpfc_cmd->timeout); |