All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@nokia.com>
To: ext Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: dapm: Fix race condition in widgets power list creation
Date: Tue, 18 Jan 2011 14:08:51 +0200	[thread overview]
Message-ID: <4D3582D3.40105@nokia.com> (raw)
In-Reply-To: <20110118113956.GE26498@opensource.wolfsonmicro.com>

Resend, since alsa-devel address was mistyped ;)

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.
But there is no need for it, since the snd_soc_dapm_new_widgets will
call dapm_power_widgets at the end. so we can remove the
snd_soc_dapm_sync from there.
For the rest:
I would replace the snd_soc_dapm_sync calls in soc-dapm.c with
dapm_power_widgets(dapm, SND_SOC_DAPM_STREAM_NOP); calls.
Modify the snd_soc_dapm_sync to use the codec->mutex around the
dapm_power_widgets call.
In that way I think all race conditions going to be covered without
adding new mutex.

What do you think?
I can make a patch...

--
Péter

  reply	other threads:[~2011-01-18 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1295318127-17968-1-git-send-email-misael.lopez@ti.com>
2011-01-18 10:39 ` [PATCH] ASoC: dapm: Fix race condition in widgets power list creation Mark Brown
     [not found]   ` <4D357B09.70505@nokia.com>
2011-01-18 11:39     ` Mark Brown
2011-01-18 12:08       ` Peter Ujfalusi [this message]
2011-01-18 12:26         ` Mark Brown
2011-01-18 12:47           ` Peter Ujfalusi
2011-01-18 13:21             ` Jarkko Nikula
2011-01-18 13:23             ` Mark Brown
2011-01-18 12:34         ` Peter Ujfalusi
2011-01-18 13:22           ` Mark Brown
2011-01-18  2:36 Misael Lopez Cruz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D3582D3.40105@nokia.com \
    --to=peter.ujfalusi@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=lrg@slimlogic.co.uk \
    --cc=misael.lopez@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.