ASoC: wm_adsp: Fix missing mutex_lock in wm_adsp_write_ctl()
Subsystems (3)
PATCH 1/1 ASoC: wm_adsp: Fix missing mutex_lock in wm_adsp_write_ctl()
wm_adsp_write_ctl() must hold the pwr_lock mutex when calling cs_dsp_get_ctl().
This was previously partially fixed by commit 781118bc2fc1 ("ASoC: wm_adsp: Fix missing locking in wm_adsp_[read|write]_ctl()") but this only put locking around the call to cs_dsp_coeff_write_ctrl(), missing the call to cs_dsp_get_ctl().
--- sound/soc/codecs/wm_adsp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/codecs/wm_adsp.c +2 -1
@@ -683,11 +683,12 @@ static void wm_adsp_control_remove(struct cs_dsp_coeff_ctl *cs_ctl)int wm_adsp_write_ctl (struct wm_adsp *dsp,const char *name,int type,unsigned int alg,void *buf,size_t len) { -struct cs_dsp_coeff_ctl *cs_ctl =cs_dsp_get_ctl (&dsp->cs_dsp, name, type, alg); +struct cs_dsp_coeff_ctl *cs_ctl;struct wm_coeff_ctl *ctl;int ret;mutex_lock (&dsp->cs_dsp.pwr_lock); + cs_ctl =cs_dsp_get_ctl (&dsp->cs_dsp, name, type, alg); ret =cs_dsp_coeff_write_ctrl (cs_ctl,0 , buf, len);mutex_unlock (&dsp->cs_dsp.pwr_lock);
Signature · 1 line
2.30.2
Mark Brown
maintainerQuoted 9 lines · Richard Fitzgerald
wm_adsp_write_ctl()must hold thepwr_lockmutex when callingcs_dsp_get_ctl().This was previously partially fixed by commit
781118bc2fc1("ASoC:wm_adsp: Fix missing locking in wm_adsp_[read|write]_ctl()") but this only put locking around the call tocs_dsp_coeff_write_ctrl(), missing the call tocs_dsp_get_ctl().[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: wm_adsp: Fix missing mutex_lock in wm_adsp_write_ctl()
commit: f193957b0fbbba397c8bddedf158b3bf7e4850fc
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