ALSA: pcm: add locks for accessing runtime resource

Add spin lock to resolve race conditions while
accessing substream runtime resource

CRs-fixed: 2112713
Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:
Karthikeyan Mani 2017-09-28 10:54:21 -07:00 committed by Gerrit - the friendly Code Review server
parent 7ae8565f29
commit de13ed16e8
1 changed files with 1 additions and 0 deletions

View File

@ -399,6 +399,7 @@ struct snd_pcm_substream {
struct snd_pcm_ops *ops;
/* -- runtime information -- */
struct snd_pcm_runtime *runtime;
spinlock_t runtime_lock;
/* -- timer section -- */
struct snd_timer *timer; /* timer */
unsigned timer_running: 1; /* time is running */