[alsa-devel] [PATCH][ASoC V2] Fix null-pointer dereference in soc_create_pcm()

Takashi Iwai tiwai at suse.de
Wed May 21 12:57:13 CEST 2008

At Wed, 21 May 2008 11:54:26 +0100,
Mark Brown wrote:
> On Wed, May 21, 2008 at 12:36:40PM +0200, Takashi Iwai wrote:
> > Mark Brown wrote:
> > > > When soc_create_pcm() finds all four components it needs, it displays a status
> > > > message.  This message references the local variables 'codec_dai' and
> > This looks applicable to the upstream tree... Shouldn't it be fixed as
> > well?
> The error condition can't occur in ASoC v1 - it doesn't support the
> dynamic registration of machine components so the local codec and CPU
> DAI variables must always have been initialised if soc_new_pcm()
> succeeds.  It's an issue for v2 because soc_create_pcm() can be called
> multiple times if the PCM is registered before all the components
> required to create it are registered - if that happens then only the
> last component to be added will have had the local variables
> initialised.

Fair enough.  Thanks for clarification.


More information about the Alsa-devel mailing list