diff options
author | Kai Vehmanen <kai.vehmanen@linux.intel.com> | 2019-11-01 12:06:35 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-11-04 13:21:15 +0000 |
commit | 5dc7d5bc9627eb26d33c7c7eefc467cf217f9326 (patch) | |
tree | 7a82b787c530ecea7f1f08775eb81ef358d10179 /lib/test_bitmap.c | |
parent | 07c1b73e2a027ea9a52677beeb6a943a3e357139 (diff) | |
download | linux-5dc7d5bc9627eb26d33c7c7eefc467cf217f9326.tar.bz2 |
ASoC: hdac_hda: fix race in device removal
When ASoC card instance is removed containing a HDA codec,
hdac_hda_codec_remove() may run in parallel with codec resume.
This will cause problems if the HDA link is freed with
snd_hdac_ext_bus_link_put() while the codec is still in
middle of its resume process.
To fix this, change the order such that pm_runtime_disable()
is called before the link is freed. This will ensure any
pending runtime PM action is completed before proceeding
to free the link.
This issue can be easily hit with e.g. SOF driver by loading and
unloading the drivers.
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20191101170635.26389-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'lib/test_bitmap.c')
0 files changed, 0 insertions, 0 deletions