All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mpt3sas: a correction in unmap_resources
@ 2015-12-23 13:21 Tomas Henzl
  2016-01-04 11:21 ` Chaitra Basappa
  2016-01-05  2:01 ` Martin K. Petersen
  0 siblings, 2 replies; 3+ messages in thread
From: Tomas Henzl @ 2015-12-23 13:21 UTC (permalink / raw)
  To: linux-scsi; +Cc: kashyap.desai, chaitra.basappa, mlombard

It might happen that we try to free an already freed pointer.

Tomas

Reported-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index d4f1dcdb83..3b09b3d09f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1827,8 +1827,10 @@ mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER *ioc)
 	_base_free_irq(ioc);
 	_base_disable_msix(ioc);
 
-	if (ioc->msix96_vector)
+	if (ioc->msix96_vector) {
 		kfree(ioc->replyPostRegisterIndex);
+		ioc->replyPostRegisterIndex = NULL;
+	}
 
 	if (ioc->chip_phys) {
 		iounmap(ioc->chip);
-- 
2.4.3


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

* RE: [PATCH] mpt3sas: a correction in unmap_resources
  2015-12-23 13:21 [PATCH] mpt3sas: a correction in unmap_resources Tomas Henzl
@ 2016-01-04 11:21 ` Chaitra Basappa
  2016-01-05  2:01 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitra Basappa @ 2016-01-04 11:21 UTC (permalink / raw)
  To: Tomas Henzl, linux-scsi; +Cc: Kashyap Desai, mlombard

Hi,
 Please consider this patch as Ack-by: Chaitra P B
<chaitra.basappa@avagotech.com>

Thanks,
 Chaitra

-----Original Message-----
From: Tomas Henzl [mailto:thenzl@redhat.com]
Sent: Wednesday, December 23, 2015 6:52 PM
To: linux-scsi@vger.kernel.org
Cc: kashyap.desai@avagotech.com; chaitra.basappa@avagotech.com;
mlombard@redhat.com
Subject: [PATCH] mpt3sas: a correction in unmap_resources

It might happen that we try to free an already freed pointer.

Tomas

Reported-by: Maurizio Lombardi <mlombard@redhat.com>
Signed-off-by: Tomas Henzl <thenzl@redhat.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c
b/drivers/scsi/mpt3sas/mpt3sas_base.c
index d4f1dcdb83..3b09b3d09f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1827,8 +1827,10 @@ mpt3sas_base_unmap_resources(struct MPT3SAS_ADAPTER
*ioc)
 	_base_free_irq(ioc);
 	_base_disable_msix(ioc);

-	if (ioc->msix96_vector)
+	if (ioc->msix96_vector) {
 		kfree(ioc->replyPostRegisterIndex);
+		ioc->replyPostRegisterIndex = NULL;
+	}

 	if (ioc->chip_phys) {
 		iounmap(ioc->chip);
-- 
2.4.3

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

* Re: [PATCH] mpt3sas: a correction in unmap_resources
  2015-12-23 13:21 [PATCH] mpt3sas: a correction in unmap_resources Tomas Henzl
  2016-01-04 11:21 ` Chaitra Basappa
@ 2016-01-05  2:01 ` Martin K. Petersen
  1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2016-01-05  2:01 UTC (permalink / raw)
  To: Tomas Henzl; +Cc: linux-scsi, kashyap.desai, chaitra.basappa, mlombard

>>>>> "Tomas" == Tomas Henzl <thenzl@redhat.com> writes:

Tomas> It might happen that we try to free an already freed pointer.
Tomas> Tomas

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2016-01-05  2:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23 13:21 [PATCH] mpt3sas: a correction in unmap_resources Tomas Henzl
2016-01-04 11:21 ` Chaitra Basappa
2016-01-05  2:01 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.