Skip to contentSkip to conversation

ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs

PATCH In review Lucas Tanure 2 participants 2 messages Jul 28, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs

soc_cleanup_component_debugfs will debugfs_remove_recursive the component->debugfs_root, so adsp doesn't need to also remove the same entry.
By doing that adsp also creates a race with core component, which causes a NULL pointer dereference

---
 sound/soc/codecs/wm_adsp.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/codecs/wm_adsp.c +0 -1
index b395df1eb72d..bbe27ab3b1fc 100644
@@ -747,7 +747,6 @@ static void wm_adsp2_init_debugfs(struct wm_adsp *dsp,
 static void wm_adsp2_cleanup_debugfs(struct wm_adsp *dsp)
 {
 	wm_adsp_debugfs_clear(dsp);
-	debugfs_remove_recursive(dsp->debugfs_root);
 }
 #else
 static inline void wm_adsp2_init_debugfs(struct wm_adsp *dsp,
Signature · 1 line
2.32.0
maintainer
#1 lore raw
Quoted 5 lines · Lucas Tanure

soc_cleanup_component_debugfs will debugfs_remove_recursive the component->debugfs_root, so adsp doesn't need to also remove the same entry.
By doing that adsp also creates a race with core component, which causes a NULL pointer dereference

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs

      commit: acbf58e530416e167c3b323111f4013d9f2b0a7d

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark