OSDN Git Service

ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx
authorKai Vehmanen <kai.vehmanen@linux.intel.com>
Fri, 29 Nov 2019 14:37:55 +0000 (16:37 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 Nov 2019 14:41:35 +0000 (15:41 +0100)
commit0c0fe9e6b95ce2e9e2c83bef5563cf223e849eda
treef15fa9bc7be4cf9ee2f7c1bccfbce847715656e8
parent336820c4374bc065317f247dc2bb37c0e41b64a6
ALSA: hda: hdmi - fix kernel oops caused by invalid PCM idx

Add additional check in hdmi_find_pcm_slot() to not return
a pcm index that points to unallocated pcm. This could happen
if codec driver is set up in codec->mst_no_extra_pcms mode.
On some platforms, this leads to a kernel oops in snd_ctl_notify(),
called via update_eld().

BugLink: https://github.com/thesofproject/linux/issues/1536
Fixes: 5398e94fb753 ALSA: hda - Add DP-MST support for NVIDIA codecs
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20191129143756.23941-1-kai.vehmanen@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c