]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwrng: imx-rngc - Moving IRQ handler registering after imx_rngc_irq_mask_clear()
authorKshitiz Varshney <kshitiz.varshney@nxp.com>
Mon, 22 Aug 2022 11:19:03 +0000 (13:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Oct 2022 07:58:04 +0000 (09:58 +0200)
commit12fe03cee274927ef0b0912cda7fd6a62db0117b
tree999d34329733474272e5963f9e119881c1606ed1
parent5ade5762b4a52ffd2aedd029ecc0bb05cba95641
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@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/char/hw_random/imx-rngc.c