Re: [PATCH v10 16/24] firmware: arm_scmi: Add Telemetry debugfs SHMTI dump support

From: Fayssal Benmlih

Date: Fri Aug 21 2026 - 11:34:41 EST


Hi Cristian,

The two V7 debugfs issues appear to remain.

First, scmi_telemetry_dbg_shmti_open() stores a pointer to the devm-owned
telemetry_shmti descriptor and its devm mapping. An open debugfs fd can
outlive debugfs removal and protocol teardown, but the open/release path
does not pin the SCMI device or protocol.

The file_operations owner pins the module, not the protocol instance or
the devm-managed SHMTI state. A later read from an already open fd can
therefore access released state.

Please use the debugfs file-lifetime helpers or explicitly pin the owning
SCMI instance from open until release, and reject reads after teardown has
started.

Second, files are still named using the enumeration index:

snprintf(id, 16, "%u", i);

while the ABI documentation says they are named using the firmware SHMTI
ID. Please use ti->shmti[i].info.sid, or change the ABI documentation to
define the filename as an enumeration index.

Thanks,
Fayçal