* [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 [flat|nested] 2+ messages in thread
* Re: [PATCH] media: pisp_be: Initialize lock before requesting IRQ
2026-08-30 15:00 [PATCH] media: pisp_be: Initialize lock before requesting IRQ Runyu Xiao
@ 2026-11-27 2:27 ` Roy
0 siblings, 0 replies; 2+ messages in thread
From: Roy @ 2026-11-27 2:27 UTC (permalink / raw)
To: Runyu Xiao
Cc: jacopo.mondi, kernel-list, mchehab, florian.fainelli,
bcm-kernel-feedback-list, linux-media, linux-rpi-kernel,
linux-arm-kernel, linux-kernel, jianhao.xu, stable
On Sun, 30 Aug 2026 23:00:45 +0800, Runyu Xiao wrote:
> 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.
I tested this on a Raspberry Pi 5 (Raspberry Pi OS kernel 6.18.39),
together with the other two pending pisp_be fixes, by rebuilding the
pisp_be module.
The driver probes normally, unloading and reloading the module 20 times
works, v4l2-compliance -m on the pispbe media device passes 400/400
before and after the reloads, and there are no new kernel messages.
Tested-by: Roy <rongh7426@gmail.com>
^ permalink raw reply [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
all inboxes | Powered by JetHome®