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 <[email protected]>
Signed-off-by: Subhransu S. Prusty <[email protected]>
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 <[email protected]>

Reviewed-on: https://chromium-review.googlesource.com/489362
Commit-Ready: Sathyanarayana Nujella <[email protected]>
Tested-by: Sathya Prakash M R <[email protected]>
Reviewed-by: Benson Leung <[email protected]>
(cherry picked from commit f7989d8dbfc6ecb6ac29332480bbfb1c336cf6e3)

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