Skip to contentSkip to conversation

megaraid: fix null pointer check in megasas_detach_one().

PATCH Applied Maurizio Lombardi 4 participants 7 messages Jan 22, 2016 – Feb 5, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 megaraid: fix null pointer check in megasas_detach_one().

The pd_seq_sync pointer can't be NULL, we have to check its entries instead.

---
 drivers/scsi/megaraid/megaraid_sas_base.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +5 -5
index 97a1c1c..f083e74 100644
@@ -5941,11 +5941,11 @@ static void megasas_detach_one(struct pci_dev *pdev)
 			if (fusion->ld_drv_map[i])
 				free_pages((ulong)fusion->ld_drv_map[i],
 					fusion->drv_map_pages);
-				if (fusion->pd_seq_sync)
-					dma_free_coherent(&instance->pdev->dev,
-						pd_seq_map_sz,
-						fusion->pd_seq_sync[i],
-						fusion->pd_seq_phys[i]);
+			if (fusion->pd_seq_sync[i])
+				dma_free_coherent(&instance->pdev->dev,
+					pd_seq_map_sz,
+					fusion->pd_seq_sync[i],
+					fusion->pd_seq_phys[i]);
 		}
 		free_pages((ulong)instance->ctrl_context,
 			instance->ctrl_context_pages);
Signature · 1 line
Maurizio Lombardi
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maurizio" == Maurizio Lombardi <[email protected]> writes:

Maurizio> The pd_seq_sync pointer can't be NULL, we have to check its Maurizio> entries instead.

Sumit?

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
maintainer
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: Martin K. Petersen [mailto:[email protected]]
Sent: Tuesday, February 02, 2016 7:24 AM
To: Maurizio Lombardi
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Subject: Re: [PATCH] megaraid: fix null pointer check in

megasas_detach_one().

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Maurizio" == Maurizio Lombardi <[email protected]> writes:

Maurizio> The pd_seq_sync pointer can't be NULL, we have to check its Maurizio> entries instead.

Sumit?

Martin,
Patch looks good but it needs to be rebased with latest repo as very recently you have checked in few megaraid_sas patches and there are two critical patches for megaraid_sas are yet pending.
Once we get status of those two outstanding patches, I will ask submitter to rebase and send this patch again or I will be resending.

Thanks,
Sumit

Quoted 3 lines

--
Martin K. Petersen Oracle Linux Engineering

#3 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Sumit" == Sumit Saxena <[email protected]> writes:

Sumit,

Sumit> Patch looks good but it needs to be rebased with latest repo as Sumit> very recently you have checked in few megaraid_sas patches and Sumit> there are two critical patches for megaraid_sas are yet pending.

You still need to respond to Tomas' comments to:

[PATCH 1/2] megaraid_sas: Fix for IO failing post OCR in SRIOV environment

Sumit> Once we get status of those two outstanding patches, I will ask Sumit> submitter to rebase and send this patch again or I will be Sumit> resending.

Rebase? The patch fixes a bug and it applies cleanly. That's all that matters.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
maintainer
#4 lore raw
Quoted 8 lines

-----Original Message-----
From: Martin K. Petersen [mailto:[email protected]]
Sent: Thursday, February 04, 2016 8:07 AM
To: Sumit Saxena
Cc: Martin K. Petersen; Maurizio Lombardi; [email protected]; [email protected]; [email protected]; linux- [email protected]; James Bottomley; [email protected]
Subject: Re: [PATCH] megaraid: fix null pointer check in

megasas_detach_one().

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

"Sumit" == Sumit Saxena <[email protected]> writes:

Sumit,

Quoted 7 lines

Sumit> Patch looks good but it needs to be rebased with latest repo as Sumit> very recently you have checked in few megaraid_sas patches and Sumit> there are two critical patches for megaraid_sas are yet pending.

You still need to respond to Tomas' comments to:

[PATCH 1/2] megaraid_sas: Fix for IO failing post OCR in SRIOV

environment

Sorry for delay. I responded to Tomas query.

Quoted 6 lines

Sumit> Once we get status of those two outstanding patches, I will ask Sumit> submitter to rebase and send this patch again or I will be Sumit> resending.

Rebase? The patch fixes a bug and it applies cleanly. That's all that

matters.
Ok, sorry for confusion. I was expecting those two critical patches getting accepted before this patch as adding this patch first may cause those 2 patches getting failed.
Anyways, this patch is committed now so if those 2 patches get applied cleanly on top on new repo, that's well otherwise I may need to resend those 2 patches.

Thanks,
Sumit

Quoted 3 lines

--
Martin K. Petersen Oracle Linux Engineering

#6 lore raw
In reply to Maurizio Lombardi
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Maurizio" == Maurizio Lombardi <[email protected]> writes:

Maurizio> The pd_seq_sync pointer can't be NULL, we have to check its Maurizio> entries instead.

Applied to 4.6/scsi-queue.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering