Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/schedule/zephyr_ll.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ static void zephyr_ll_task_done(struct zephyr_ll *sch,

task->state = SOF_TASK_STATE_FREE;

if (pdata->freeing)
if (pdata && pdata->freeing)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real issue is with the 48cdc4d + CONFIG_USERSPACE=y
this combination causes the ChainDMA crash on PTL and only on PTL as CONFIG_USERSPACE=y is only set for PTL, all other platform has USERSPACE disabled.
it boils down to some difference due to the use of kernel/sys/sem.c vs kernel/userspace/sem.c for semaphore.

Reverting the commit or disabling USERSPACE fixed the crash on PTL.

/*
* zephyr_ll_task_free() is trying to free this task. Complete
* it and signal the semaphore to let the function proceed
Expand Down Expand Up @@ -258,7 +258,7 @@ static void zephyr_ll_run(void *data)
task = container_of(list, struct task, list);
pdata = task->priv_data;

if (task->state == SOF_TASK_STATE_CANCEL) {
if (!pdata || task->state == SOF_TASK_STATE_CANCEL) {
list = list->next;
zephyr_ll_task_done(sch, task);
continue;
Expand Down
Loading