[PATCH 5/9] ALSA: hda: Skip event processing for unregistered codecs

Takashi Iwai tiwai at suse.de
Sat Jul 9 18:47:41 CEST 2022


On Wed, 06 Jul 2022 14:02:26 +0200,
Cezary Rojewski wrote:
> 
> 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 at intel.com>
> ---
>  include/sound/hda_codec.h |  1 -
>  include/sound/hdaudio.h   |  1 +
>  sound/hda/hdac_bus.c      |  2 +-
>  sound/pci/hda/hda_codec.c | 10 +++++-----
>  sound/soc/codecs/hda.c    |  4 ++--

This patch doesn't apply cleanly because the change in
sound/soc/codecs/hda.c still not included in my tree.

Mark, there's yet one case we need the merge of asoc-next :)


thanks,

Takashi


More information about the Alsa-devel mailing list