From: Wenkai Du Date: Wed, 23 Apr 2014 10:29:30 +0000 (+0300) Subject: ASoC: Intel: Fix audio crash due to race condition in stream deletion X-Git-Tag: omap-for-v3.16/fixes-against-rc1~177^2~1^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d132cb0a162fa55c82e06b771fcaa871d30c9398;p=pandora-kernel.git ASoC: Intel: Fix audio crash due to race condition in stream deletion There is a race between sst_byt_stream_free() and sst_byt_get_stream() if sst_byt_get_stream() called from sst_byt_irq_thread() context is accessing the byt->stream_list while a stream is deleted from the list. A stream is added to byt->stream_list in sst_byt_stream_new() and deleted in sst_byt_stream_free(). sst_byt_get_stream() is always protected by sst->spinlock, but the stream addition and deletion are not protected. The patch adds spinlock to both stream addition and deletion. [Jarkko: Same fix added to sst-haswell-ipc.c too] Signed-off-by: Wenkai Du Signed-off-by: Jarkko Nikula Signed-off-by: Mark Brown --- Reading git-diff-tree failed