Patch "spi: bcm2835: Release the DMA channel if probe fails after dma_init" has been added to the 4.9-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: bcm2835: Release the DMA channel if probe fails after dma_init

to the 4.9-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-bcm2835-release-the-dma-channel-if-probe-fails-after-dma_init.patch
and it can be found in the queue-4.9 subdirectory.

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


>From foo@baz Thu Dec 10 01:41:37 PM CET 2020
From: Lukas Wunner <lukas@xxxxxxxxx>
Date: Sun, 6 Dec 2020 13:46:04 +0100
Subject: spi: bcm2835: Release the DMA channel if probe fails after dma_init
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Mark Brown <broonie@xxxxxxxxxx>, Sudip Mukherjee <sudipm.mukherjee@xxxxxxxxx>, stable@xxxxxxxxxxxxxxx
Message-ID: <43e6aab6ac72a313046cf2db3b823db32a71a885.1607258638.git.lukas@xxxxxxxxx>

From: Peter Ujfalusi <peter.ujfalusi@xxxxxx>

[ Upstream commit 666224b43b4bd4612ce3b758c038f9bc5c5e3fcb ]

The DMA channel was not released if either devm_request_irq() or
devm_spi_register_controller() failed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxx>
Reviewed-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>
Link: https://lore.kernel.org/r/20191212135550.4634-3-peter.ujfalusi@xxxxxx
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
[lukas: backport to 4.19-stable]
Signed-off-by: Lukas Wunner <lukas@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/spi/spi-bcm2835.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/spi/spi-bcm2835.c
+++ b/drivers/spi/spi-bcm2835.c
@@ -787,18 +787,19 @@ static int bcm2835_spi_probe(struct plat
 			       dev_name(&pdev->dev), master);
 	if (err) {
 		dev_err(&pdev->dev, "could not request IRQ: %d\n", err);
-		goto out_clk_disable;
+		goto out_dma_release;
 	}
 
 	err = spi_register_master(master);
 	if (err) {
 		dev_err(&pdev->dev, "could not register SPI master: %d\n", err);
-		goto out_clk_disable;
+		goto out_dma_release;
 	}
 
 	return 0;
 
-out_clk_disable:
+out_dma_release:
+	bcm2835_dma_release(master);
 	clk_disable_unprepare(bs->clk);
 	return err;
 }


Patches currently in stable-queue which might be from lukas@xxxxxxxxx are

queue-4.9/spi-fix-controller-unregister-order-harder.patch
queue-4.9/spi-bcm-qspi-fix-use-after-free-on-unbind.patch
queue-4.9/spi-bcm2835-fix-use-after-free-on-unbind.patch
queue-4.9/spi-bcm2835-release-the-dma-channel-if-probe-fails-after-dma_init.patch
queue-4.9/spi-introduce-device-managed-spi-controller-allocation.patch



[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