Re: [PATCH v3 1/2] regmap: Remove debugfs before cache teardown
From: Peng Fan
Date: Thu Oct 08 2026 - 06:44:13 EST
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@xxxxxxxxx>
Reviewed-by: Peng Fan <peng.fan@xxxxxxx>