alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Misael Lopez Cruz <misael.lopez@ti.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [PATCH] ASoC: dapm: Fix race condition in widgets power list creation
Date: Tue, 18 Jan 2011 10:39:54 +0000	[thread overview]
Message-ID: <20110118103954.GA26498@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1295318127-17968-1-git-send-email-misael.lopez@ti.com>

On Mon, Jan 17, 2011 at 08:35:27PM -0600, Misael Lopez Cruz wrote:
> Multiple calls to dapm_power_widgets() can create a race condition
> causing power list to be corrupted. Those scenarios can occur in
> multistream usecases, stream start/stop along with simultaneous
> update power calls (mixer, mux, dapm_sync, stream_event).

> A new 'dapm_mutex' is added to soc_card, which is held while power
> list is created.

This needs a bit more analysis - why are we getting multiple
simultaneous calls to dapm_power_widgets() and is that itself safe?  The
ASoC locking model has always been to have a big lock around the entire
card rather than to lock subcomponents, and for example this isn't going
to make sure we're consistent with register map accesses from other
parts of the code.

       reply	other threads:[~2011-01-18 11:03 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 ` Mark Brown [this message]
     [not found]   ` <4D357B09.70505@nokia.com>
2011-01-18 11:39     ` [PATCH] ASoC: dapm: Fix race condition in widgets power list creation Mark Brown
2011-01-18 12:08       ` Peter Ujfalusi
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=20110118103954.GA26498@opensource.wolfsonmicro.com \
    --to=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).