FROMLIST: ASoC: Intel: Skylake: Fix IPC rx_list corruption

In SKL+ platforms, all IPC commands are serialised, i.e. the driver sends
a new IPC to DSP, only after receiving a reply from the firmware for the
current IPC.

Hence it seems apparent that there is only a single modifier of the IPC RX
List. However, during an IPC timeout case in a multithreaded environment,
there is a possibility of the list element being deleted two times if not
properly protected.

So, use spin lock save/restore to prevent rx_list corruption.

Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Link: git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/sound.git
tag: topic/intel
(cherry picked from commit 78515f9338fbe742fd8cee4631751cf3a8c8b19f)

BUG=b:37616304
TEST=audio works; 500+ cycles of suspend/resume verified
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>

Reviewed-on: https://chromium-review.googlesource.com/489362
Commit-Ready: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Tested-by: Sathya Prakash M R <sathya.prakash.m.r@intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
(cherry picked from commit f7989d8dbfc6ecb6ac29332480bbfb1c336cf6e3)

Change-Id: I30e2c498a209d0129c11d3e8faf7ffdba31b5c61
Reviewed-on: https://chromium-review.googlesource.com/508177
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Trybot-Ready: Benson Leung <bleung@chromium.org>
1 file changed