projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff04437
)
ASoC: Intel: avs: Access path components under lock
author
Amadeusz Sławiński
<amadeuszx.slawinski@linux.intel.com>
Fri, 19 May 2023 20:17:06 +0000
(22:17 +0200)
committer
Mark Brown
<broonie@kernel.org>
Mon, 22 May 2023 10:18:21 +0000
(11:18 +0100)
Path and its components should be accessed under lock to prevent
problems with one thread modifying them while other tries to read.
Fixes:
c8c960c10971
("ASoC: Intel: avs: APL-based platforms support")
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link:
https://lore.kernel.org/r/20230519201711.4073845-3-amadeuszx.slawinski@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/apl.c
patch
|
blob
|
history
diff --git
a/sound/soc/intel/avs/apl.c
b/sound/soc/intel/avs/apl.c
index
02683dc
..
1860099
100644
(file)
--- a/
sound/soc/intel/avs/apl.c
+++ b/
sound/soc/intel/avs/apl.c
@@
-169,6
+169,7
@@
static bool apl_lp_streaming(struct avs_dev *adev)
{
struct avs_path *path;
+ spin_lock(&adev->path_list_lock);
/* Any gateway without buffer allocated in LP area disqualifies D0IX. */
list_for_each_entry(path, &adev->path_list, node) {
struct avs_path_pipeline *ppl;
@@
-188,11
+189,14
@@
static bool apl_lp_streaming(struct avs_dev *adev)
if (cfg->copier.dma_type == INVALID_OBJECT_ID)
continue;
- if (!mod->gtw_attrs.lp_buffer_alloc)
+ if (!mod->gtw_attrs.lp_buffer_alloc) {
+ spin_unlock(&adev->path_list_lock);
return false;
+ }
}
}
}
+ spin_unlock(&adev->path_list_lock);
return true;
}