]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ALSA: PCM: check if ops are defined before suspending PCM
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Fri, 8 Feb 2019 23:29:53 +0000 (17:29 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:31:34 +0000 (22:31 +0200)
commit62ecc64ce389a688c6c87fb506512496c19b51ba
tree109ed494253a1183ca6b63583f0293feff2fb67e
parent416b593a22b80ab7ff4e6cefca147e7657d95b6f
ALSA: PCM: check if ops are defined before suspending PCM

[ Upstream commit d9c0b2afe820fa3b3f8258a659daee2cc71ca3ef ]

BE dai links only have internal PCM's and their substream ops may
not be set. Suspending these PCM's will result in their
 ops->trigger() being invoked and cause a kernel oops.
So skip suspending PCM's if their ops are NULL.

[ NOTE: this change is required now for following the recent PCM core
  change to get rid of snd_pcm_suspend() call.  Since DPCM BE takes
  the runtime carried from FE while keeping NULL ops, it can hit this
  bug.  See details at:
     https://github.com/thesofproject/linux/pull/582
  -- tiwai ]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/core/pcm_native.c