From: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
To: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>,
quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com,
mchehab@kernel.org
Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv2] media: venus: protect against spurious interrupts during probe
Date: Fri, 6 Jun 2025 15:43:00 +0100 [thread overview]
Message-ID: <2ce9f14e-b0cf-41f4-84f0-6e80749b9504@linaro.org> (raw)
In-Reply-To: <20250606123334.4114123-1-jorge.ramirez@oss.qualcomm.com>
On 06/06/2025 13:33, Jorge Ramirez-Ortiz wrote:
> Make sure the interrupt handler is initialized before the interrupt is
> registered.
>
> If the IRQ is registered before hfi_create(), it's possible that an
> interrupt fires before the handler setup is complete, leading to a NULL
> dereference.
>
> This error condition has been observed during system boot on Rb3Gen2.
>
> Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
> ---
> v2: fix authorship
> fix spelling mistake
>
> drivers/media/platform/qcom/venus/core.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
> index d305d74bb152..5bd99d0aafe4 100644
> --- a/drivers/media/platform/qcom/venus/core.c
> +++ b/drivers/media/platform/qcom/venus/core.c
> @@ -424,13 +424,13 @@ static int venus_probe(struct platform_device *pdev)
> INIT_DELAYED_WORK(&core->work, venus_sys_error_handler);
> init_waitqueue_head(&core->sys_err_done);
>
> - ret = devm_request_threaded_irq(dev, core->irq, hfi_isr, venus_isr_thread,
> - IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> - "venus", core);
> + ret = hfi_create(core, &venus_core_ops);
> if (ret)
> goto err_core_put;
>
> - ret = hfi_create(core, &venus_core_ops);
> + ret = devm_request_threaded_irq(dev, core->irq, hfi_isr, venus_isr_thread,
> + IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
> + "venus", core);
> if (ret)
> goto err_core_put;
>
Please add a Fixes: tag.
---
bod
prev parent reply other threads:[~2025-06-06 14:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 12:33 Jorge Ramirez-Ortiz
2025-06-06 14:43 ` Bryan O'Donoghue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2ce9f14e-b0cf-41f4-84f0-6e80749b9504@linaro.org \
--to=bryan.odonoghue@linaro.org \
--cc=jorge.ramirez@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=quic_dikshita@quicinc.com \
--cc=quic_vgarodia@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®