ALSA: hda: Fix possible null-ptr-deref when assigning a stream
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 6 Oct 2023 10:28:55 +0000 (12:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 6 Oct 2023 12:30:19 +0000 (14:30 +0200)
commitf93dc90c2e8ed664985e366aa6459ac83cdab236
tree11e8a036185081c80590573f3a7d6eb060005e7d
parentfdfc374af5dc345fbb9686921fa60176c1c41da0
ALSA: hda: Fix possible null-ptr-deref when assigning a stream

While AudioDSP drivers assign streams exclusively of HOST or LINK type,
nothing blocks a user to attempt to assign a COUPLED stream. As
supplied substream instance may be a stub, what is the case when
code-loading, such scenario ends with null-ptr-deref.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20231006102857.749143-2-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_stream.c