Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH] media: pisp_be: Initialize lock before requesting IRQ
@ 2026-08-30 15:00 Runyu Xiao
  2026-11-27  2:27 ` Roy
  0 siblings, 1 reply; 2+ messages in thread
From: Runyu Xiao @ 2026-08-30 15:00 UTC (permalink / raw)
  To: jacopo.mondi
  Cc: kernel-list, mchehab, florian.fainelli, bcm-kernel-feedback-list,
	linux-media, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	runyu.xiao, jianhao.xu, stable

The PiSP BE interrupt handler can schedule work that takes hw_lock. The
lock must be initialized before devm_request_irq() makes the handler
runnable.

Fixes: 12187bd5d4f8 ("media: raspberrypi: Add support for PiSP BE")
Cc: stable@vger.kernel.org
Assisted-by: Codex:GPT-5
Signed-off-by: Runyu Xiao <runyu.xiao@seu.edu.cn>
---
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
index d60d92d2f..43fca54be 100644
--- a/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
+++ b/drivers/media/platform/raspberrypi/pisp_be/pisp_be.c
@@ -1695,6 +1695,7 @@ static int pispbe_probe(struct platform_device *pdev)
 	dev_set_drvdata(&pdev->dev, pispbe);
 	pispbe->dev = &pdev->dev;
 	platform_set_drvdata(pdev, pispbe);
+	spin_lock_init(&pispbe->hw_lock);
 
 	pispbe->be_reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(pispbe->be_reg_base)) {
@@ -1732,7 +1733,6 @@ static int pispbe_probe(struct platform_device *pdev)
 		goto pm_runtime_disable_err;
 
 	pispbe->hw_busy = false;
-	spin_lock_init(&pispbe->hw_lock);
 	ret = pispbe_hw_init(pispbe);
 	if (ret)
 		goto pm_runtime_suspend_err;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-11-27  2:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-30 15:00 [PATCH] media: pisp_be: Initialize lock before requesting IRQ Runyu Xiao
2026-11-27  2:27 ` Roy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox