Skip to content
Commit 2dd64869 authored by Kai Vehmanen's avatar Kai Vehmanen Committed by Fabio Baltieri
Browse files

soc/intel_adsp: ipc: initialize semaphore in driver init



The ipc driver device data (struct intel_adsp_ipc_data) contains a
semaphore. Upon device init, the device data is zeroed out. This is safe
for other fields, but the semaphore should be properly initialized
before use.

This lack of initialization leads to a system crash when CONFIG_POLL is
enabled (e.g. to enable CONFIG_SHELL), IPC driver handles an interrupt
and executes k_sem_give() on a uninitialized semaphore object. This will
eventually lead to null dereference in z_handle_obj_poll_events().

Signed-off-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
parent 571ad19b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment