[Sound-open-firmware] [PATCH] ipc: validate pipeline on stream free IPC.

Liam Girdwood liam.r.girdwood at linux.intel.com
Wed Sep 20 15:58:04 CEST 2017


Make sure we have a valid pipeline for stream free IPC calls.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 src/ipc/intel-ipc.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c
index 0c1b10a..fb6c846 100644
--- a/src/ipc/intel-ipc.c
+++ b/src/ipc/intel-ipc.c
@@ -287,6 +287,13 @@ static int ipc_stream_pcm_free(uint32_t header)
 		return -ENODEV;
 	}
 
+	/* sanity check comp */
+	if (pcm_dev->cd->pipeline == NULL) {
+		trace_ipc_error("eF1");
+		trace_value(free_req->comp_id);
+		return -EINVAL;
+	}
+
 	/* reset the pipeline */
 	return pipeline_reset(pcm_dev->cd->pipeline, pcm_dev->cd);
 }
-- 
2.11.0



More information about the Sound-open-firmware mailing list