diff mbox

[01/21] lpfc: Fix opps when ExpressLane is enabled

Message ID 20170802233648.4573-2-jsmart2021@gmail.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

James Smart Aug. 2, 2017, 11:36 p.m. UTC
From: Dick Kennedy <dick.kennedy@broadcom.com>

Null pointer dereference in lpfc_sli4_fof_intr_handler

The driver does not set up cq->assoc_qp for sli4_hba->oas_cq

Initialize cq->assoc_qp before accessing it

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Nikola Pajkovsky Aug. 3, 2017, 10:43 a.m. UTC | #1
James Smart <jsmart2021@gmail.com> writes:

> From: Dick Kennedy <dick.kennedy@broadcom.com>
>
> Null pointer dereference in lpfc_sli4_fof_intr_handler
>
> The driver does not set up cq->assoc_qp for sli4_hba->oas_cq
>
> Initialize cq->assoc_qp before accessing it
>
> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
> Signed-off-by: James Smart <james.smart@broadcom.com>
> ---
>  drivers/scsi/lpfc/lpfc_sli.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
> index e948ea05fd33..0615bf9def23 100644
> --- a/drivers/scsi/lpfc/lpfc_sli.c
> +++ b/drivers/scsi/lpfc/lpfc_sli.c
> @@ -13557,6 +13557,9 @@ lpfc_sli4_fof_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe)
>  	/* Save EQ associated with this CQ */
>  	cq->assoc_qp = phba->sli4_hba.fof_eq;
>  
> +	/* Save EQ associated with this CQ */
> +	cq->assoc_qp = phba->sli4_hba.fof_eq;
> +

Copy & paste error? Above lines are similar.
James Smart Aug. 5, 2017, 12:36 a.m. UTC | #2
On 8/3/2017 3:43 AM, Nikola Pajkovsky wrote:
> James Smart <jsmart2021@gmail.com> writes:
>
>> From: Dick Kennedy <dick.kennedy@broadcom.com>
>>
>> Null pointer dereference in lpfc_sli4_fof_intr_handler
>>
>> The driver does not set up cq->assoc_qp for sli4_hba->oas_cq
>>
>> Initialize cq->assoc_qp before accessing it
>>
>> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
>> Signed-off-by: James Smart <james.smart@broadcom.com>
>> ---
>>   drivers/scsi/lpfc/lpfc_sli.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
>> index e948ea05fd33..0615bf9def23 100644
>> --- a/drivers/scsi/lpfc/lpfc_sli.c
>> +++ b/drivers/scsi/lpfc/lpfc_sli.c
>> @@ -13557,6 +13557,9 @@ lpfc_sli4_fof_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe)
>>   	/* Save EQ associated with this CQ */
>>   	cq->assoc_qp = phba->sli4_hba.fof_eq;
>>   
>> +	/* Save EQ associated with this CQ */
>> +	cq->assoc_qp = phba->sli4_hba.fof_eq;
>> +
> Copy & paste error? Above lines are similar.
>
yeah - a pretty stupid error. I believe we merged the same patch twice 
at different time points. surprised git am allowed it.

Thanks. patch will be removed.

-- james
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index e948ea05fd33..0615bf9def23 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -13557,6 +13557,9 @@  lpfc_sli4_fof_handle_eqe(struct lpfc_hba *phba, struct lpfc_eqe *eqe)
 	/* Save EQ associated with this CQ */
 	cq->assoc_qp = phba->sli4_hba.fof_eq;
 
+	/* Save EQ associated with this CQ */
+	cq->assoc_qp = phba->sli4_hba.fof_eq;
+
 	/* Process all the entries to the OAS CQ */
 	while ((cqe = lpfc_sli4_cq_get(cq))) {
 		workposted |= lpfc_sli4_fp_handle_cqe(phba, cq, cqe);