From a4ccc5d7bcace76909ddca645bd7d6792069daaf Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Thu, 19 Sep 2024 13:54:03 -0700 Subject: [PATCH] ipc3: override type field once comp_driver found A bad IPC can mismatch UUID and type, causing downstream processes to operate differently than the final component target. This is because get_drv will not reject the mismatch and given we don't know the state of topology we can't start now. Instead we can override the ipc with the proper type. Signed-off-by: Curtis Malainey --- src/ipc/ipc3/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index 678d3306e4b1..162e1e49ef91 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -134,7 +134,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp) info = container_of(clist, struct comp_driver_info, list); if (!memcmp(info->drv->uid, comp_ext->uuid, - UUID_SIZE)) { + UUID_SIZE) && comp->type == info->drv->type) { drv = info->drv; break; }