You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> + if (msg->reply_size)
> + memcpy(reply_data, msg->reply_data, msg->reply_size);
I'd add a sanity check here for avoiding a buffer overflow.
The reply buffer seems to be allocated in PAGE_SIZE. Will it be more
than that?
> +/* find original TX message from DSP reply */
> +static struct snd_sof_ipc_msg *sof_ipc_reply_find_msg(struct snd_sof_ipc *ipc,
> + u32 header)
> +{
> + struct snd_sof_dev *sdev = ipc->sdev;
> + struct snd_sof_ipc_msg *msg;
> +
> + header = SOF_IPC_MESSAGE_ID(header);
> +
> + list_for_each_entry(msg, &ipc->reply_list, list) {
> + if (SOF_IPC_MESSAGE_ID(msg->header) == header)
> + return msg;
> + }
Is it safe to traverse the list without lock here?
There seems no lock in this and relevant code.
Activity
lyakh commentedon Mar 19, 2019
Both questions resolved by #695 - for the former a check has been added, for the latter the .reply_list doesn't exist any more.