[alsa-devel] [PATCH] ASoC: dapm: Fix race condition in widgets power list creation
Mark Brown
broonie at opensource.wolfsonmicro.com
Tue Jan 18 11:39:54 CET 2011
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.
More information about the Alsa-devel
mailing list