summaryrefslogtreecommitdiff
path: root/include/sound
diff options
context:
space:
mode:
authorBanajit Goswami <bgoswami@codeaurora.org>2015-04-10 16:50:43 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 20:10:04 -0700
commit2b5acaa66827c4f31aa19d248a1c6621325e4137 (patch)
tree9b42755c75655884ed4cbb480703c282f6b7c16f /include/sound
parent42152f3e366c0945abd92efa687ecb02f183a3d6 (diff)
ASoC: Add locking in DAPM widget power update
While playback and capture is done concurrently the dapm widget data is accessed parallelly which results in data corruption and kernel panic. Fix this problem by serializing the stream event operation by adding lock dapm_seq_run will invoke dapm power sequence for pre-sorted list of widgets to be powered up. Kernel panic issue is observed during stability runs with the above sequence caused by null pointer dereference in dapm_seq_run_coalesced. Fix kernel panic issue by checking for valid snd_soc_dapm_context pointer in dapm_seq_run before invoking dapm_seq_run_coalesced Widget list in dapm is getting corrupted during concurrent use cases where dapm_power_widget is accessed. This corruption is resulting in kernel crash in dapm. Fix the issue by adding protection in dapm_power_widgets API. Change-Id: I49d19860277726cf3152e104ab40627fd56c021c CRs-Fixed: 388785 Signed-off-by: Sriranjan Srikantam <cssrika@codeaurora.org> Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org> Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/soc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index eb030bad423e..31b860fef19e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1090,6 +1090,7 @@ struct snd_soc_card {
struct mutex mutex;
struct mutex dapm_mutex;
+ struct mutex dapm_power_mutex;
bool instantiated;