Skip to content

Commit

Permalink
log: disable the logging task before clearing log state
Browse files Browse the repository at this point in the history
If logging state is cleared while the logging task is still running,
it can lead to an inconsistent state. Stop the logging task before
clearing the state.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
  • Loading branch information
lyakh committed Jun 17, 2024
1 parent ce0d7db commit 7473ce1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc/ipc4/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ int ipc4_logging_enable_logs(bool first_block,
&ops, NULL, MTRACE_IPC_CORE, 0);
schedule_task(&mtrace_task, mtrace_aging_timer * 1000, 0);
} else {
schedule_task_cancel(&mtrace_task);
adsp_mtrace_log_init(NULL);
log_backend_deactivate(log_backend);
schedule_task_cancel(&mtrace_task);
}

return 0;
Expand Down

0 comments on commit 7473ce1

Please sign in to comment.