From: Cristian Marussi <cristian.marussi@arm.com>
To: Usama Arif <usama.arif@linux.dev>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org,
sudeep.holla@kernel.org, james.quinlan@broadcom.com,
f.fainelli@gmail.com, vincent.guittot@linaro.org,
etienne.carriere@st.com, peng.fan@oss.nxp.com,
michal.simek@amd.com, dan.carpenter@linaro.org, d-gole@ti.com,
jonathan.cameron@huawei.com, elif.topuz@arm.com,
lukasz.luba@arm.com, philip.radford@arm.com, brauner@kernel.org,
souvik.chakravarty@arm.com
Subject: Re: [PATCH v3 02/24] firmware: arm_scmi: Reduce the scope of protocols mutex
Date: Mon, 15 Jun 2026 08:48:35 +0100 [thread overview]
Message-ID: <ai-uQZasZR_MCgSn@pluto> (raw)
In-Reply-To: <20260612101525.340337-1-usama.arif@linux.dev>
On Fri, Jun 12, 2026 at 03:15:24AM -0700, Usama Arif wrote:
> On Sun, 29 Mar 2026 17:33:13 +0100 Cristian Marussi <cristian.marussi@arm.com> wrote:
>
> > Currently the mutex dedicated to the protection of the list of registered
> > protocols is held during all the protocol initialization phase.
> >
> > Such a wide locking region is not needed and causes problem when trying to
> > initialize notifications from within a protocol initialization routine.
> >
> > Reduce the scope of the protocol mutex.
>
> I think this changes more than the mutex scope. scmi_get_protocol_instance()
> can now drop protocols_mtx after idr_find() while scmi_protocol_release()
> can concurrently drop the final reference, remove the IDR entry, and release
> the devres group. Does that leaves a use-after-free window around the returned
> pi?
>
I have to review this mechanism in general in V5 so I will get back to
you on this once I have refreshed my memory on this own code of mine :P
Thanks,
Cristian
next prev parent reply other threads:[~2026-06-15 7:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-29 16:33 [PATCH v3 00/24] Introduce SCMI Telemetry FS support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 01/24] firmware: arm_scmi: Add new SCMIv4.0 error codes definitions Cristian Marussi
[not found] ` <20260612101100.186627-1-usama.arif@linux.dev>
2026-06-15 7:44 ` Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 02/24] firmware: arm_scmi: Reduce the scope of protocols mutex Cristian Marussi
[not found] ` <20260612101525.340337-1-usama.arif@linux.dev>
2026-06-15 7:48 ` Cristian Marussi [this message]
2026-03-29 16:33 ` [PATCH v3 03/24] firmware: arm_scmi: Allow registration of unknown-size events/reports Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 04/24] firmware: arm_scmi: Allow protocols to register for notifications Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 05/24] uapi: Add ARM SCMI definitions Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 06/24] dt-bindings: firmware: arm,scmi: Add support for telemetry protocol Cristian Marussi
2026-03-29 17:31 ` Rob Herring (Arm)
2026-03-29 18:00 ` Cristian Marussi
2026-03-30 7:15 ` Krzysztof Kozlowski
2026-03-30 7:11 ` Krzysztof Kozlowski
2026-03-29 16:33 ` [PATCH v3 07/24] include: trace: Add Telemetry trace events Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 08/24] firmware: arm_scmi: Add basic Telemetry support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 09/24] firmware: arm_scmi: Add support to parse SHMTIs areas Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 10/24] firmware: arm_scmi: Add Telemetry configuration operations Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 11/24] firmware: arm_scmi: Add Telemetry DataEvent read capabilities Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 12/24] firmware: arm_scmi: Add support for Telemetry reset Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 13/24] firmware: arm_scmi: Add Telemetry notification support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 14/24] firmware: arm_scmi: Add support for boot-on Telemetry Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 15/24] firmware: arm_scmi: Add System Telemetry filesystem driver Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 16/24] fs/stlmfs: Document ARM SCMI Telemetry filesystem Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 17/24] firmware: arm_scmi: Add System Telemetry ioctls support Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 18/24] fs/stlmfs: Document alternative ioctl based binary interface Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 19/24] firmware: arm_scmi: Add Telemetry components view Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 20/24] fs/stlmfs: Document alternative topological view Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 21/24] [RFC] docs: stlmfs: Document ARM SCMI Telemetry FS ABI Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 22/24] firmware: arm_scmi: Add lazy population support to Telemetry FS Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 23/24] fs/stlmfs: Document lazy mode and related mount option Cristian Marussi
2026-03-29 16:33 ` [PATCH v3 24/24] [RFC] tools/scmi: Add SCMI Telemetry testing tool Cristian Marussi
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=ai-uQZasZR_MCgSn@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=brauner@kernel.org \
--cc=d-gole@ti.com \
--cc=dan.carpenter@linaro.org \
--cc=elif.topuz@arm.com \
--cc=etienne.carriere@st.com \
--cc=f.fainelli@gmail.com \
--cc=james.quinlan@broadcom.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=michal.simek@amd.com \
--cc=peng.fan@oss.nxp.com \
--cc=philip.radford@arm.com \
--cc=souvik.chakravarty@arm.com \
--cc=sudeep.holla@kernel.org \
--cc=usama.arif@linux.dev \
--cc=vincent.guittot@linaro.org \
/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