Hi,
 Please consider this patch as Ack-by: Chaitra P B
<[email protected]>

Thanks,
 Chaitra

-----Original Message-----
From: Tomas Henzl [mailto:[email protected]]
Sent: Wednesday, December 23, 2015 6:52 PM
To: [email protected]
Cc: [email protected]; [email protected];
[email protected]
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 <[email protected]>
Signed-off-by: Tomas Henzl <[email protected]>
---
 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
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to