[PATCH v3 1/2] regmap: Remove debugfs before cache teardown

Peng Fan peng.fan at oss.nxp.com
Thu Oct 8 03:46:41 PDT 2026


On Tue, Oct 06, 2026 at 06:03:15PM +1100, Michael Reeves wrote:
>regmap_exit() and regmap_reinit_cache() destroy the register cache before
>removing debugfs. A concurrent debugfs cache operation can therefore
>access cache state after the backend exit callback starts freeing it.
>
>Remove debugfs before cache teardown, and clear the debugfs pointer after
>removal. During cache reinitialization, recreate debugfs only after the
>new cache initializes successfully.
>
>Signed-off-by: Michael Reeves <michael.reeves077 at gmail.com>

Reviewed-by: Peng Fan <peng.fan at nxp.com>



More information about the maple-tree mailing list