From: Yaohan Li <shunsheng1218@gmail.com>
To: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Lee Jones" <lee@kernel.org>
Cc: Rafael J. Wysocki <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
linux-renesas-soc@vger.kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 06/10] thermal/drivers/rcar: Free IRQs before cancelling delayed work on remove
Date: Sat, 05 Dec 2026 13:38:24 +0800 [thread overview]
Message-ID: <179644910405.2811168.2333848709570991116@gmail.com> (raw)
In-Reply-To: <20261204171528.GA3999746@ragnatech.se>
Hi Niklas, Lee,
Thanks for looping me in.
disable_delayed_work_sync() prevents further queuing of priv->work and
drains a running instance, but it does not unregister or synchronize
with rcar_thermal_irq().
Since the IRQ is shared, the handler can still be invoked by another
device even after this device's interrupt sources have been masked. It
still accesses common->base and walks common->head.
Also, devm_request_irq() runs before the per-sensor priv allocations, so
leaving IRQ teardown to devres can allow those objects to be freed while
the handler is still registered.
I therefore agree that the IRQs need to be explicitly released before
the sensor state is freed.
One small ordering detail in the current patch: an in-flight
rcar_thermal_work() can call rcar_thermal_irq_enable() between the first
rcar_thermal_irq_disable() and cancel_delayed_work_sync(), which can
leave a brief window after devm_free_irq() where the hardware interrupt
source is re-enabled until the second rcar_thermal_irq_disable(). I
don't have R-Car Gen2 hardware to check whether that matters in
practice, so I won't send a competing revision while Lee's patch is
being reviewed.
Thanks,
Yaohan
next prev parent reply other threads:[~2026-12-05 5:38 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 19:54 [PATCH 00/10] thermal: Fix Critical and High issues reported by Sashiko Lee Jones
2026-12-03 19:54 ` [PATCH 01/10] thermal: intel: hfi: Pass byte size to alloc_pages_exact() and free_pages_exact() Lee Jones
2026-12-04 20:22 ` Rafael J. Wysocki (Intel)
2026-12-03 19:54 ` [PATCH 02/10] thermal: intel: hfi: Publish hfi_instance only after successful initialisation Lee Jones
2026-12-04 20:29 ` Rafael J. Wysocki (Intel)
2026-12-03 19:54 ` [PATCH 03/10] thermal: int3400: Clean up ODVP attributes after unregistering thermal zone Lee Jones
2026-12-04 20:24 ` Rafael J. Wysocki (Intel)
2026-12-03 19:54 ` [PATCH 04/10] thermal/drivers/qcom/tsens-v1: Validate sensor count before legacy calibration Lee Jones
2026-12-03 19:54 ` [PATCH 05/10] thermal/drivers/qcom/tsens: Bound sensor initialisation by num_sensors Lee Jones
2026-12-03 19:54 ` [PATCH 06/10] thermal/drivers/rcar: Free IRQs before cancelling delayed work on remove Lee Jones
2026-12-04 17:15 ` Niklas Söderlund
2026-12-05 5:38 ` Yaohan Li [this message]
2026-12-03 19:54 ` [PATCH 07/10] thermal/drivers/imx91: Acquire runtime PM reference in imx91_tmu_get_temp() Lee Jones
2026-12-04 10:40 ` Peng Fan (OSS)
2026-12-03 19:54 ` [PATCH 08/10] tools/thermal/tmon: Open log file with O_NOFOLLOW before validating and truncating Lee Jones
2026-12-04 20:34 ` Rafael J. Wysocki (Intel)
2026-12-03 19:54 ` [PATCH 09/10] thermal/drivers/qcom/tsens: Drop __init from ops init callbacks Lee Jones
2026-12-03 19:54 ` [PATCH 10/10] thermal/drivers/imx91: Use pm_runtime_resume_and_get() in imx91_tmu_change_mode() Lee Jones
2026-12-03 20:21 ` Frank Li
2026-12-04 10:40 ` Peng Fan (OSS)
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=179644910405.2811168.2333848709570991116@gmail.com \
--to=shunsheng1218@gmail.com \
--cc=daniel.lezcano@kernel.org \
--cc=geert+renesas@glider.be \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=magnus.damm@gmail.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.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®