All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs
@ 2021-07-28 10:44 ` Lucas Tanure
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Tanure @ 2021-07-28 10:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Richard Fitzgerald
  Cc: Simon Trimmer, James Schulman, Pierre-Louis Bossart,
	Adam Brickman, patches, alsa-devel, linux-kernel, 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

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index b395df1eb72d..bbe27ab3b1fc 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -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,
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs
@ 2021-07-28 10:44 ` Lucas Tanure
  0 siblings, 0 replies; 4+ messages in thread
From: Lucas Tanure @ 2021-07-28 10:44 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Charles Keepax, Richard Fitzgerald
  Cc: alsa-devel, Adam Brickman, Lucas Tanure, patches, Simon Trimmer,
	Pierre-Louis Bossart, James Schulman, linux-kernel

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

Signed-off-by: Lucas Tanure <tanureal@opensource.cirrus.com>
---
 sound/soc/codecs/wm_adsp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index b395df1eb72d..bbe27ab3b1fc 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -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,
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs
  2021-07-28 10:44 ` Lucas Tanure
@ 2021-07-28 23:27   ` Mark Brown
  -1 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-07-28 23:27 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela, Liam Girdwood, Richard Fitzgerald,
	Charles Keepax, Lucas Tanure
  Cc: Mark Brown, patches, James Schulman, Pierre-Louis Bossart,
	linux-kernel, Adam Brickman, Simon Trimmer, alsa-devel

On Wed, 28 Jul 2021 11:44:16 +0100, Lucas Tanure wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs
@ 2021-07-28 23:27   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2021-07-28 23:27 UTC (permalink / raw)
  To: Takashi Iwai, Jaroslav Kysela, Liam Girdwood, Richard Fitzgerald,
	Charles Keepax, Lucas Tanure
  Cc: alsa-devel, Adam Brickman, patches, Simon Trimmer,
	Pierre-Louis Bossart, linux-kernel, Mark Brown, James Schulman

On Wed, 28 Jul 2021 11:44:16 +0100, Lucas Tanure wrote:
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-28 23:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 10:44 [PATCH] ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs Lucas Tanure
2021-07-28 10:44 ` Lucas Tanure
2021-07-28 23:27 ` Mark Brown
2021-07-28 23:27   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.