diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2017-01-10 06:05:54 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-01-17 14:14:32 -0500 |
commit | 8667f515952feefebb3c0f8d9a9266c91b101a46 (patch) | |
tree | 5df38c9df76c2f236733ad13eddf068fdb61dffd /drivers/scsi | |
parent | 68af412c7713b55c01ffc4312320abd10ca70e77 (diff) |
scsi: lpfc: Set elsiocb contexts to NULL after freeing it
Set the elsiocb contexts to NULL after freeing as others depend on it.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_els.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c index 236e4e51d161..7b6bd8ed0d0b 100644 --- a/drivers/scsi/lpfc/lpfc_els.c +++ b/drivers/scsi/lpfc/lpfc_els.c | |||
@@ -3590,12 +3590,14 @@ lpfc_els_free_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *elsiocb) | |||
3590 | } else { | 3590 | } else { |
3591 | buf_ptr1 = (struct lpfc_dmabuf *) elsiocb->context2; | 3591 | buf_ptr1 = (struct lpfc_dmabuf *) elsiocb->context2; |
3592 | lpfc_els_free_data(phba, buf_ptr1); | 3592 | lpfc_els_free_data(phba, buf_ptr1); |
3593 | elsiocb->context2 = NULL; | ||
3593 | } | 3594 | } |
3594 | } | 3595 | } |
3595 | 3596 | ||
3596 | if (elsiocb->context3) { | 3597 | if (elsiocb->context3) { |
3597 | buf_ptr = (struct lpfc_dmabuf *) elsiocb->context3; | 3598 | buf_ptr = (struct lpfc_dmabuf *) elsiocb->context3; |
3598 | lpfc_els_free_bpl(phba, buf_ptr); | 3599 | lpfc_els_free_bpl(phba, buf_ptr); |
3600 | elsiocb->context3 = NULL; | ||
3599 | } | 3601 | } |
3600 | lpfc_sli_release_iocbq(phba, elsiocb); | 3602 | lpfc_sli_release_iocbq(phba, elsiocb); |
3601 | return 0; | 3603 | return 0; |