]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Skip event processing for unregistered codecs
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 6 Jul 2022 12:02:26 +0000 (14:02 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 15 Jul 2022 14:26:50 +0000 (16:26 +0200)
commit61bda2da24d06e0799ce2fd748de60db30b28e22
tree683616d9489b7085e3454a3233ef116eb486411d
parent5135f48fc19d073c1ba0159d97206ee1093b1a27
ALSA: hda: Skip event processing for unregistered codecs

When codec is unbound but not yet removed, in the eyes of
snd_hdac_bus_process_unsol_events() it is still a valid target to
delegate work to. Such behaviour may lead to use-after-free errors.
Address by verifying if codec is actually registered.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220706120230.427296-6-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hda_codec.h
include/sound/hdaudio.h
sound/hda/hdac_bus.c
sound/pci/hda/hda_codec.c
sound/soc/codecs/hda.c