Skip to content

Commit 7b00d77

Browse files
committed
schedule: ll: initialise task object to 0
This is needed at least to set the .priv_data pointer to NULL. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 282640f commit 7b00d77

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

src/schedule/zephyr_ll.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,8 +619,15 @@ static const struct scheduler_ops zephyr_ll_ops = {
619619
#if CONFIG_SOF_USERSPACE_LL
620620
struct task *zephyr_ll_task_alloc(void)
621621
{
622-
return sof_heap_alloc(zephyr_ll_user_heap(), SOF_MEM_FLAG_USER,
623-
sizeof(struct task), sizeof(void *));
622+
struct task *task = sof_heap_alloc(zephyr_ll_user_heap(),
623+
SOF_MEM_FLAG_USER/* | SOF_MEM_FLAG_COHERENT*/,
624+
sizeof(*task), sizeof(void *));
625+
626+
if (task)
627+
/* At least .priv_data must be NULL for zephyr_ll_task_init() */
628+
memset(task, 0, sizeof(*task));
629+
630+
return task;
624631
}
625632

626633
void user_ll_grant_access(struct k_thread *thread)

0 commit comments

Comments
 (0)