Patch "scsi: megaraid_sas: Fix double kfree()" has been added to the 5.19-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: megaraid_sas: Fix double kfree()

to the 5.19-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-megaraid_sas-fix-double-kfree.patch
and it can be found in the queue-5.19 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 25aa86ee786fe9be54c8c90c8f3b995ac13b7955
Author: Guixin Liu <kanie@xxxxxxxxxxxxxxxxx>
Date:   Tue Aug 2 15:18:49 2022 +0800

    scsi: megaraid_sas: Fix double kfree()
    
    [ Upstream commit 8c499e49240bd93628368c3588975cfb94169b8b ]
    
    When allocating log_to_span fails, kfree(instance->ctrl_context) is called
    twice. Remove redundant call.
    
    Link: https://lore.kernel.org/r/1659424729-46502-1-git-send-email-kanie@xxxxxxxxxxxxxxxxx
    Acked-by: Sumit Saxena <sumit.saxena@xxxxxxxxxxxx>
    Signed-off-by: Guixin Liu <kanie@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 5b5885d9732b6..3e9b2b0099c7a 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -5311,7 +5311,6 @@ megasas_alloc_fusion_context(struct megasas_instance *instance)
 		if (!fusion->log_to_span) {
 			dev_err(&instance->pdev->dev, "Failed from %s %d\n",
 				__func__, __LINE__);
-			kfree(instance->ctrl_context);
 			return -ENOMEM;
 		}
 	}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux