From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: Myeonghun Pak <mhun512@gmail.com>,
Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Cc: Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-kernel@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>,
stable@vger.kernel.org, Ijae Kim <ae878000@gmail.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Subject: Re: [PATCH v5 1/2] media: venus: hfi: disable IRQ before freeing HFI device
Date: Tue, 1 Dec 2026 14:25:51 +0530 [thread overview]
Message-ID: <ae6f35d3-03e3-82d9-3645-6bfe4cdd065b@oss.qualcomm.com> (raw)
In-Reply-To: <20261023223635.3c895c4752c4-2-mhun512@gmail.com>
On 10/24/2026 8:10 AM, Myeonghun Pak wrote:
> venus_hfi_destroy() frees hdev and its interface queues before disabling
> the IRQ. A handler that already loaded core->priv can therefore access
> freed state even after core->priv is cleared.
>
> Move disable_irq() before clearing core->priv and releasing HFI state so
> both the hard and threaded handlers have completed before teardown.
>
> Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files")
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://lore.kernel.org/all/20260612103333.5585D1F000E9@smtp.kernel.org/
> Cc: stable@vger.kernel.org
> Assisted-by: LLM
Checkpatch reports an error for the Assisted-by: LLM tag:
WARNING: Non-standard signature: Assisted-by:
#18:
Assisted-by: LLM
ERROR: Unrecognized email address: 'LLM'
#18:
Assisted-by: LLM
total: 1 errors, 1 warnings, 0 checks, 12 lines checked
> Co-developed-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Ijae Kim <ae878000@gmail.com>
> Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
> Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
> ---
> drivers/media/platform/qcom/venus/hfi_venus.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c
> index bd82066bb6e77f68ac3fe1440a8b5429ad62a192..e7e4e78a186adaa7fd80deeb094ed53d54f27ba6 100644
> --- a/drivers/media/platform/qcom/venus/hfi_venus.c
> +++ b/drivers/media/platform/qcom/venus/hfi_venus.c
> @@ -1689,11 +1689,11 @@ void venus_hfi_destroy(struct venus_core *core)
> {
> struct venus_hfi_device *hdev = to_hfi_priv(core);
>
> + disable_irq(core->irq);
> core->priv = NULL;
> venus_interface_queues_release(hdev);
> mutex_destroy(&hdev->lock);
> kfree(hdev);
> - disable_irq(core->irq);
> core->ops = NULL;
> }
>
next prev parent reply other threads:[~2026-12-01 8:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 2:40 [PATCH v5 0/2] media: venus: fix HFI teardown races Myeonghun Pak
2026-10-24 2:40 ` [PATCH v5 1/2] media: venus: hfi: disable IRQ before freeing HFI device Myeonghun Pak
2026-11-17 11:22 ` bod
2026-12-01 8:55 ` Vishnu Reddy [this message]
2026-10-24 2:40 ` [PATCH v5 2/2] media: venus: disable recovery work before HFI teardown Myeonghun Pak
2026-11-17 11:20 ` bod
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=ae6f35d3-03e3-82d9-3645-6bfe4cdd065b@oss.qualcomm.com \
--to=busanna.reddy@oss.qualcomm.com \
--cc=ae878000@gmail.com \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=dikshita.agarwal@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=mhun512@gmail.com \
--cc=sashiko-bot@kernel.org \
--cc=stable@vger.kernel.org \
--cc=vikash.garodia@oss.qualcomm.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®