]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: Fix pcm stream context restore crash
authorKevin Strasser <kevin.strasser@intel.com>
Mon, 19 May 2014 08:14:23 +0000 (11:14 +0300)
committerMark Brown <broonie@linaro.org>
Mon, 19 May 2014 16:30:56 +0000 (17:30 +0100)
commit70e173f83d17d6e993ceaefe70fdcaa02c2df3dc
treeb7abe5d7bf55f22b0cc1f6226c2c21c0e8dcf04e
parent2d47e8155b584d4fdc4c430b1bb9985bfa33e7be
ASoC: Intel: Fix pcm stream context restore crash

In some cases the pcm stream is closed while context has been
scheduled to be restored, causing a null pointer deref panic.
Cancel work to ensure stream does not get freed while work is
still active/pending.

Also, restoring the pcm context can be safely skipped after the
stream has been stopped. Check if pcm stream is still running
before restoring stream context to help pending work finish
more quickly in stream close path.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/sst-baytrail-pcm.c