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

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.