From: Takashi Iwai Subject: Re: [PATCH][ASoC V2] Fix null-pointer dereference in soc_create_pcm() Date: Wed, 21 May 2008 12:57:13 +0200 Message-ID: References: <1211237159-26546-1-git-send-email-timur@freescale.com> <20080520113130.GA32249@rakim.wolfsonmicro.main> <20080521105426.GA26954@rakim.wolfsonmicro.main> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 1C668244E2 for ; Wed, 21 May 2008 12:57:14 +0200 (CEST) In-Reply-To: <20080521105426.GA26954@rakim.wolfsonmicro.main> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: alsa-devel@alsa-project.org, Timur Tabi List-Id: alsa-devel@alsa-project.org 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. Takashi