]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Intel: Do not process IPC reply before firmware boot
authorMark Brown <broonie@kernel.org>
Tue, 12 Jul 2022 18:21:42 +0000 (19:21 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 12 Jul 2022 18:21:42 +0000 (19:21 +0100)
commitcfa4df3b0d5f9dd24026c9da08deaba68dffa667
treebbfee05cd874143569f53545c83fc34cbc4c00e6
parent4f657add62f9b3b7c7296057e2559e58d371a9da
parent74f6232bdab4f8e86c72a08ddbf8e9e108f02520
ASoC: SOF: Intel: Do not process IPC reply before firmware boot

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

By mistake a developer managed to create a 'corrupted' IPC4 firmware image which
loaded fine to the DSP and after boot it sent an IPC reply before we would have
received the FW_READY message.
It turned out that the image was an IPC3 firmware and the IPC reply was the IPC3
FW_READY notification message which got understood as an IPC4 reply message due
to the difference between the two IPC mechanism.

This caused a NULL pointer dereference since the reply memory will be allocated
after the FW_READY message.

To make sure this will not bite again, skip any spurious reply messages before
the FW_READY.