Patch "spi: geni-qcom: Fix incorrect free_irq() sequence" 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

    spi: geni-qcom: Fix incorrect free_irq() sequence

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:
     spi-geni-qcom-fix-incorrect-free_irq-sequence.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 e628d45db67471c9cae33d24f19ee93261279ed0
Author: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
Date:   Mon Sep 9 15:31:40 2024 +0800

    spi: geni-qcom: Fix incorrect free_irq() sequence
    
    [ Upstream commit b787a33864121a565aeb0e88561bf6062a19f99c ]
    
    In spi_geni_remove(), the free_irq() sequence is different from that
    on the probe error path. And the IRQ will still remain and it's interrupt
    handler may use the dma channel after release dma channel and before free
    irq, which is not secure, fix it.
    
    Fixes: b59c122484ec ("spi: spi-geni-qcom: Add support for GPI dma")
    Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
    Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
    Link: https://patch.msgid.link/20240909073141.951494-3-ruanjinjie@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/spi/spi-geni-qcom.c b/drivers/spi/spi-geni-qcom.c
index 983c4896c8cf..7401ed3b9acd 100644
--- a/drivers/spi/spi-geni-qcom.c
+++ b/drivers/spi/spi-geni-qcom.c
@@ -1170,9 +1170,9 @@ static void spi_geni_remove(struct platform_device *pdev)
 	/* Unregister _before_ disabling pm_runtime() so we stop transfers */
 	spi_unregister_master(spi);
 
-	spi_geni_release_dma_chan(mas);
-
 	free_irq(mas->irq, spi);
+
+	spi_geni_release_dma_chan(mas);
 }
 
 static int __maybe_unused spi_geni_runtime_suspend(struct device *dev)




[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