Patch "iommu/arm-smmu-v3: Free MSIs in case of ENOMEM" has been added to the 6.6-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

    iommu/arm-smmu-v3: Free MSIs in case of ENOMEM

to the 6.6-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:
     iommu-arm-smmu-v3-free-msis-in-case-of-enomem.patch
and it can be found in the queue-6.6 subdirectory.

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



commit f05aa66de4647064496d763eb09094c679a52be1
Author: Aleksandr Aprelkov <aaprelkov@xxxxxxxxxxxx>
Date:   Wed Apr 3 12:37:59 2024 +0700

    iommu/arm-smmu-v3: Free MSIs in case of ENOMEM
    
    [ Upstream commit 80fea979dd9d48d67c5b48d2f690c5da3e543ebd ]
    
    If devm_add_action() returns -ENOMEM, then MSIs are allocated but not
    not freed on teardown. Use devm_add_action_or_reset() instead to keep
    the static analyser happy.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Signed-off-by: Aleksandr Aprelkov <aaprelkov@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240403053759.643164-1-aaprelkov@xxxxxxxxxxxx
    [will: Tweak commit message, remove warning message]
    Signed-off-by: Will Deacon <will@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
index bd0a596f9863a..68b81f9c2f4b1 100644
--- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
+++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
@@ -3193,7 +3193,7 @@ static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
 	smmu->priq.q.irq = msi_get_virq(dev, PRIQ_MSI_INDEX);
 
 	/* Add callback to free MSIs on teardown */
-	devm_add_action(dev, arm_smmu_free_msis, dev);
+	devm_add_action_or_reset(dev, arm_smmu_free_msis, dev);
 }
 
 static void arm_smmu_setup_unique_irqs(struct arm_smmu_device *smmu)




[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