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

Takashi Iwai tiwai at suse.de
Fri Jul 15 16:27:39 CEST 2022


On Sat, 09 Jul 2022 18:47:41 +0200,
Takashi Iwai wrote:
> 
> 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.

Now merged to for-next branch.


thanks,

Takashi


More information about the Alsa-devel mailing list