Patch "hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()" has been added to the 5.15-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

    hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()

to the 5.15-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:
     hwrng-imx-rngc-moving-irq-handler-registering-after-.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 3324a30eba930652090561a7b03197e943d09fb8
Author: Kshitiz Varshney <kshitiz.varshney@xxxxxxx>
Date:   Mon Aug 22 13:19:03 2022 +0200

    hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()
    
    [ Upstream commit 10a2199caf437e893d9027d97700b3c6010048b7 ]
    
    Issue:
    While servicing interrupt, if the IRQ happens to be because of a SEED_DONE
    due to a previous boot stage, you end up completing the completion
    prematurely, hence causing kernel to crash while booting.
    
    Fix:
    Moving IRQ handler registering after imx_rngc_irq_mask_clear()
    
    Fixes: 1d5449445bd0 (hwrng: mx-rngc - add a driver for Freescale RNGC)
    Signed-off-by: Kshitiz Varshney <kshitiz.varshney@xxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/char/hw_random/imx-rngc.c b/drivers/char/hw_random/imx-rngc.c
index e32c52c10d4d..1d7ce7443586 100644
--- a/drivers/char/hw_random/imx-rngc.c
+++ b/drivers/char/hw_random/imx-rngc.c
@@ -264,13 +264,6 @@ static int imx_rngc_probe(struct platform_device *pdev)
 	if (rng_type != RNGC_TYPE_RNGC && rng_type != RNGC_TYPE_RNGB)
 		return -ENODEV;
 
-	ret = devm_request_irq(&pdev->dev,
-			irq, imx_rngc_irq, 0, pdev->name, (void *)rngc);
-	if (ret) {
-		dev_err(rngc->dev, "Can't get interrupt working.\n");
-		return ret;
-	}
-
 	init_completion(&rngc->rng_op_done);
 
 	rngc->rng.name = pdev->name;
@@ -284,6 +277,13 @@ static int imx_rngc_probe(struct platform_device *pdev)
 
 	imx_rngc_irq_mask_clear(rngc);
 
+	ret = devm_request_irq(&pdev->dev,
+			irq, imx_rngc_irq, 0, pdev->name, (void *)rngc);
+	if (ret) {
+		dev_err(rngc->dev, "Can't get interrupt working.\n");
+		return ret;
+	}
+
 	if (self_test) {
 		ret = imx_rngc_self_test(rngc);
 		if (ret) {



[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