linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] megaraid: fix null pointer check in megasas_detach_one().
@ 2016-01-22 12:41 Maurizio Lombardi
  2016-02-02  1:53 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Maurizio Lombardi @ 2016-01-22 12:41 UTC (permalink / raw)
  To: sumit.saxena; +Cc: kashyap.desai, uday.lingala, linux-scsi, jbottomley, thenzl

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

Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
---
 drivers/scsi/megaraid/megaraid_sas_base.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
index 97a1c1c..f083e74 100644
--- a/drivers/scsi/megaraid/megaraid_sas_base.c
+++ b/drivers/scsi/megaraid/megaraid_sas_base.c
@@ -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);
-- 
Maurizio Lombardi


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-01-22 12:41 [PATCH] megaraid: fix null pointer check in megasas_detach_one() Maurizio Lombardi
@ 2016-02-02  1:53 ` Martin K. Petersen
  2016-02-03  4:42   ` Sumit Saxena
  2016-02-04 15:12 ` Tomas Henzl
  2016-02-05  3:24 ` Martin K. Petersen
  2 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2016-02-02  1:53 UTC (permalink / raw)
  To: Maurizio Lombardi
  Cc: sumit.saxena, kashyap.desai, uday.lingala, linux-scsi, jbottomley,
	thenzl

>>>>> "Maurizio" == Maurizio Lombardi <mlombard@redhat.com> writes:

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

Sumit?

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-02-02  1:53 ` Martin K. Petersen
@ 2016-02-03  4:42   ` Sumit Saxena
  2016-02-04  2:36     ` Martin K. Petersen
  0 siblings, 1 reply; 7+ messages in thread
From: Sumit Saxena @ 2016-02-03  4:42 UTC (permalink / raw)
  To: Martin K. Petersen, Maurizio Lombardi
  Cc: sumit.saxena, kashyap.desai, uday.lingala, linux-scsi, jbottomley,
	thenzl

> -----Original Message-----
> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> Sent: Tuesday, February 02, 2016 7:24 AM
> To: Maurizio Lombardi
> Cc: sumit.saxena@avagotech.com; kashyap.desai@avagotech.com;
> uday.lingala@avagotech.com; linux-scsi@vger.kernel.org;
> jbottomley@parallels.com; thenzl@redhat.com
> Subject: Re: [PATCH] megaraid: fix null pointer check in
megasas_detach_one().
>
> >>>>> "Maurizio" == Maurizio Lombardi <mlombard@redhat.com> 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
>
> --
> Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-02-03  4:42   ` Sumit Saxena
@ 2016-02-04  2:36     ` Martin K. Petersen
  2016-02-05 12:34       ` Sumit Saxena
  0 siblings, 1 reply; 7+ messages in thread
From: Martin K. Petersen @ 2016-02-04  2:36 UTC (permalink / raw)
  Cc: Martin K. Petersen, Maurizio Lombardi, sumit.saxena,
	kashyap.desai, uday.lingala, linux-scsi, James Bottomley, thenzl

>>>>> "Sumit" == Sumit Saxena <sumit.saxena@broadcom.com> 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.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-01-22 12:41 [PATCH] megaraid: fix null pointer check in megasas_detach_one() Maurizio Lombardi
  2016-02-02  1:53 ` Martin K. Petersen
@ 2016-02-04 15:12 ` Tomas Henzl
  2016-02-05  3:24 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Tomas Henzl @ 2016-02-04 15:12 UTC (permalink / raw)
  To: Maurizio Lombardi, sumit.saxena
  Cc: kashyap.desai, uday.lingala, linux-scsi, jbottomley

On 22.1.2016 13:41, Maurizio Lombardi wrote:
> The pd_seq_sync pointer can't be NULL, we have to check
> its entries instead.
>
> Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>

Reviewed-by: Tomas Henzl <thenzl@redhat.com>

Tomas


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-01-22 12:41 [PATCH] megaraid: fix null pointer check in megasas_detach_one() Maurizio Lombardi
  2016-02-02  1:53 ` Martin K. Petersen
  2016-02-04 15:12 ` Tomas Henzl
@ 2016-02-05  3:24 ` Martin K. Petersen
  2 siblings, 0 replies; 7+ messages in thread
From: Martin K. Petersen @ 2016-02-05  3:24 UTC (permalink / raw)
  To: Maurizio Lombardi
  Cc: sumit.saxena, kashyap.desai, uday.lingala, linux-scsi, jbottomley,
	thenzl

>>>>> "Maurizio" == Maurizio Lombardi <mlombard@redhat.com> 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.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

* RE: [PATCH] megaraid: fix null pointer check in megasas_detach_one().
  2016-02-04  2:36     ` Martin K. Petersen
@ 2016-02-05 12:34       ` Sumit Saxena
  0 siblings, 0 replies; 7+ messages in thread
From: Sumit Saxena @ 2016-02-05 12:34 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Maurizio Lombardi, Kashyap Desai, Uday Lingala, linux-scsi,
	James Bottomley, thenzl

> -----Original Message-----
> From: Martin K. Petersen [mailto:martin.petersen@oracle.com]
> Sent: Thursday, February 04, 2016 8:07 AM
> To: Sumit Saxena
> Cc: Martin K. Petersen; Maurizio Lombardi; sumit.saxena@broadcom.com;
> kashyap.desai@broadcom.com; uday.lingala@broadcom.com; linux-
> scsi@vger.kernel.org; James Bottomley; thenzl@redhat.com
> Subject: Re: [PATCH] megaraid: fix null pointer check in
megasas_detach_one().
>
> >>>>> "Sumit" == Sumit Saxena <sumit.saxena@broadcom.com> 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

Sorry for delay. I responded to Tomas query.
>
> 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
>
> --
> Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-05 12:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-22 12:41 [PATCH] megaraid: fix null pointer check in megasas_detach_one() Maurizio Lombardi
2016-02-02  1:53 ` Martin K. Petersen
2016-02-03  4:42   ` Sumit Saxena
2016-02-04  2:36     ` Martin K. Petersen
2016-02-05 12:34       ` Sumit Saxena
2016-02-04 15:12 ` Tomas Henzl
2016-02-05  3:24 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).