All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
To: bod@kernel.org
Cc: Vikash Garodia <vikash.garodia@oss.qualcomm.com>,
	Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
	Abhinav Kumar <abhinav.kumar@linux.dev>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@kernel.org>,
	Stefan Schmidt <stefan.schmidt@linaro.org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Hungyu Lin <dennylin0707@gmail.com>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH v3 2/4] media: iris: Disable the system error work on removal
Date: Wed, 2 Dec 2026 14:45:32 +0530	[thread overview]
Message-ID: <d3e60555-53db-a76f-8b3c-e2e3d585d7dd@oss.qualcomm.com> (raw)
In-Reply-To: <179604311084.1329975.2425990508110024419.b4-reply@b4>


On 11/30/2026 6:21 PM, bod@kernel.org wrote:
> On 2026-11-19 17:15 +0530, Vishnu Reddy wrote:
>> iris_remove() calls cancel_delayed_work_sync() to stop the system error
>> work. This cancels a pending work and waits for a running one. It does
>> not stop the work from being queued again afterwards.
>>
>> A system error interrupt can still arrive after that call. The
>> interrupt handler queues the work again. The work then runs after the
>> removal and uses resources that are already freed.
>>
>> Use disable_delayed_work_sync() instead. Once it returns no new work
>> can be queued. The work cannot run again during or after the removal.
>>
>> Fixes: 452480931648 ("media: iris: cancel sys error work on driver removal")
>> Cc: stable@vger.kernel.org
>> Reviewed-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
>> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
>> ---
>>  drivers/media/platform/qcom/iris/iris_probe.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/qcom/iris/iris_probe.c b/drivers/media/platform/qcom/iris/iris_probe.c
>> index 343e44c6b9c4..6f02bb629867 100644
>> --- a/drivers/media/platform/qcom/iris/iris_probe.c
>> +++ b/drivers/media/platform/qcom/iris/iris_probe.c
>> @@ -251,7 +251,7 @@ static void iris_remove(struct platform_device *pdev)
>>  	if (!core)
>>  		return;
>>
> Wouldn't it make sense to devm_free_irq() here before disabling the
> work-queue so the interrupt handler can't run for the rest of this routine
> ?

Calling devm_free_irq() here can leave the IRQ enabled with no handler. A
sys error work queued by the handler before the free still runs, and its
iris_core_init() -> iris_vpu_power_on() calls enable_irq() on the freed
line.

> ---
> bod
>
>

  reply	other threads:[~2026-12-02  9:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-19 11:45 [PATCH v3 0/4] media: iris: Fix issues in the driver unbind path Vishnu Reddy
2026-11-19 11:45 ` [PATCH v3 1/4] media: iris: Fix runtime PM reference imbalance on failed resume Vishnu Reddy
2026-11-25 10:18   ` Konrad Dybcio
2026-11-19 11:45 ` [PATCH v3 2/4] media: iris: Disable the system error work on removal Vishnu Reddy
2026-11-30 12:51   ` bod
2026-12-02  9:15     ` Vishnu Reddy [this message]
2026-11-19 11:45 ` [PATCH v3 3/4] media: iris: Fix use-after-free on unbind with open sessions Vishnu Reddy
2026-11-27 12:28   ` Vikash Garodia
2026-11-30 13:11   ` bod
2026-12-02  9:15     ` Vishnu Reddy
2026-11-19 11:45 ` [PATCH v3 4/4] media: iris: Wake up blocked clients when the driver is removed Vishnu Reddy
2026-11-27 12:29   ` Vikash Garodia
2026-11-30 14:27   ` bod
2026-12-02  9:15     ` Vishnu Reddy

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=d3e60555-53db-a76f-8b3c-e2e3d585d7dd@oss.qualcomm.com \
    --to=busanna.reddy@oss.qualcomm.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=bod@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dennylin0707@gmail.com \
    --cc=dikshita.agarwal@oss.qualcomm.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=hverkuil@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=stefan.schmidt@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.