]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
ASoC: SOF: core: fix error handling with the probe workqueue
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Fri, 24 May 2019 19:09:19 +0000 (14:09 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 28 May 2019 14:47:19 +0000 (15:47 +0100)
commit0bce512e784d137700275f7839c4547eddbd4b6a
tree5d55c9a62c7bbdaac8ae6fee80fb62e704f30cb7
parent13931ae31b67a8a26a4cd417088fc43e3d4a8591
ASoC: SOF: core: fix error handling with the probe workqueue

In some configurations, it's a requirement to split the probe in two,
with a second part handled in a workqueue (e.g. for HDMI support
which depends on the DRM modules).

SOF already handles these configurations but the error flow is
incorrect. When an error occurs in the workqueue, the probe has
technically already completed. If we release the resources on errors,
this generates kernel oops/use-after-free when the resources are
released a second time on module removal.

GitHub issue: https://github.com/thesofproject/linux/issues/945
Fixes: c16211d6226 ("ASoC: SOF: Add Sound Open Firmware driver core")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/core.c