From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] ASoC: dapm: Fix race condition in widgets power list creation Date: Tue, 18 Jan 2011 12:26:05 +0000 Message-ID: <20110118122605.GG26498@opensource.wolfsonmicro.com> References: <1295318127-17968-1-git-send-email-misael.lopez@ti.com> <20110118103954.GA26498@opensource.wolfsonmicro.com> <4D357B09.70505@nokia.com> <20110118113956.GE26498@opensource.wolfsonmicro.com> <4D3582D3.40105@nokia.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from opensource2.wolfsonmicro.com (opensource.wolfsonmicro.com [80.75.67.52]) by alsa0.perex.cz (Postfix) with ESMTP id 9C96510383B for ; Tue, 18 Jan 2011 13:26:08 +0100 (CET) Content-Disposition: inline In-Reply-To: <4D3582D3.40105@nokia.com> 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: Peter Ujfalusi Cc: Misael Lopez Cruz , "alsa-devel@alsa-project.org" , Liam Girdwood List-Id: alsa-devel@alsa-project.org On Tue, Jan 18, 2011 at 02:08:51PM +0200, Peter Ujfalusi wrote: > On 01/18/11 13:39, ext Mark Brown wrote: > > > I *suspect* that we're in a similar case and either the locking has been > > > broken by the multi-component stuff or there's other cases that need > > > protection, probably the jack detection code. > The snd_soc_dapm_sync is just a wrapper for dapm_power_widgets, right? > It (snd_soc_dapm_sync) is used in soc-core:soc_post_component_init. You're jumping into the analysis mid-way here again... > Modify the snd_soc_dapm_sync to use the codec->mutex around the > dapm_power_widgets call. This doesn't sound like the right solution in a multi-CODEC system, DAPM will affect multiple devices within the system.