linux-stable/sound/soc
Yang Yingliang 390a1a9828 ASoC: sof_es8336: fix possible use-after-free in sof_es8336_remove()
[ Upstream commit 1b41beaa7a ]

sof_es8336_remove() calls cancel_delayed_work(). However, that
function does not wait until the work function finishes. This
means that the callback function may still be running after
the driver's remove function has finished, which would result
in a use-after-free.

Fix by calling cancel_delayed_work_sync(), which ensures that
the work is properly cancelled, no longer running, and unable
to re-schedule itself.

Fixes: 89cdb224f2 ("ASoC: sof_es8336: reduce pop noise on speaker")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20221205143721.3988988-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-31 13:33:06 +01:00
..
adi
amd ASoC: amd: yc: Add Xiaomi Redmi Book Pro 14 2022 into DMI table 2022-12-31 13:33:03 +01:00
apple ASoC: apple: mca: Adjust timing of component unregister 2022-09-27 13:59:59 +01:00
atmel ASoC: mchp-spdiftx: Fix clang -Wbitfield-constant-conversion 2022-08-23 17:34:05 +01:00
au1x
bcm ASoC: bcm2835-i2s: Switch to use dev_err_probe() helper 2022-09-14 15:06:00 +01:00
cirrus
codecs ASoC: codecs: rt298: Add quirk for KBL-R RVP platform 2022-12-31 13:32:59 +01:00
dwc
fsl ASoC: Merge dropped fixes from v5.18 2022-11-24 13:19:02 +00:00
generic ASoC: simple-card: Fix up checks for HW param fixups 2022-10-19 13:39:34 +01:00
hisilicon
img ASoC: Refactor non_legacy_dai_naming flag 2022-06-29 16:58:08 +01:00
intel ASoC: sof_es8336: fix possible use-after-free in sof_es8336_remove() 2022-12-31 13:33:06 +01:00
jz4740 ASoC: jz4740-i2s: Remove unused 'mem' resource 2022-07-20 21:43:53 +01:00
kirkwood
mediatek ASoC: mediatek: mt8173: Enable IRQ when pdata is ready 2022-12-31 13:32:19 +01:00
meson
mxs
pxa ASoC: pxa: fix null-pointer dereference in filter() 2022-12-31 13:32:11 +01:00
qcom ASoC: qcom: cleanup and fix dependency of QCOM_COMMON 2022-12-31 13:32:15 +01:00
rockchip ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR 2022-09-30 17:12:27 +01:00
samsung ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
sh ASoC: Updates for v6.1 2022-10-03 16:30:42 +02:00
sof ASoC: SOF: topology: No need to assign core ID if token parsing failed 2022-11-07 13:58:02 +00:00
spear
sprd
sti
stm ASoC: stm32: i2s: remove irqf_oneshot flag 2022-11-10 17:50:52 +00:00
sunxi ASoC: sunxi: fix declaration compile error 2022-09-21 10:28:19 +01:00
tegra ASoC: tegra: tegra20_das: Drop write-only driver data member 2022-07-05 19:54:00 +01:00
ti ASoC: ti: omap-mcbsp: remove useless assignment 2022-08-31 12:13:05 +01:00
uniphier
ux500
xilinx ASoC: xilinx: Suppress second error message about reset failure in .remove() 2022-07-05 16:44:31 +01:00
xtensa
Kconfig ASoC: apple: mca: Start new platform driver 2022-08-25 13:51:34 +01:00
Makefile ASoC: apple: mca: Start new platform driver 2022-08-25 13:51:34 +01:00
soc-ac97.c ASoC: Variable type completion 2022-08-17 13:00:27 +01:00
soc-acpi.c
soc-card.c
soc-component.c Revert "ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync" 2022-10-04 14:09:30 +01:00
soc-compress.c ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
soc-core.c ASoC: core: Fix use-after-free in snd_soc_exit() 2022-10-28 12:58:04 +01:00
soc-dai.c ASoC: Change handling of unimplemented set_bclk_ratio 2022-08-19 13:19:59 +01:00
soc-dapm.c ASoC: dapm: Don't use prefix for regulator name 2022-10-26 14:17:34 +01:00
soc-devres.c
soc-generic-dmaengine-pcm.c ASoC: soc.h: remove num_cpus/codecs 2022-09-20 12:19:30 +01:00
soc-jack.c
soc-link.c
soc-ops.c ASoC: ops: Correct bounds check for second channel on SX controls 2022-11-25 16:29:33 +00:00
soc-pcm.c ASoC: soc-pcm: Add NULL check in BE reparenting 2022-11-22 12:23:00 +00:00
soc-topology-test.c
soc-topology.c ASoC: soc-core.c: setup rtd->pmdown_time at soc_new_pcm_runtime() 2022-09-19 17:52:41 +01:00
soc-utils-test.c ASoC: soc-utils-test: Add test for snd_soc_params_to_bclk() 2022-08-17 15:19:14 +01:00
soc-utils.c ASoC: soc-utils: Remove __exit for snd_soc_util_exit() 2022-11-07 13:37:04 +00:00