Skip to content

Conversation

@kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Mar 15, 2023

Set of fixes to issues found via static code analysis.

Chao Song and others added 5 commits March 15, 2023 17:20
The config to get for smart_amp_test module is
struct sof_smart_amp_config, instead of the bigger
wrapper struct smart_amp_data, so the config size
should be the size of struct sof_smart_amp_config.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
(cherry picked from commit b2ac05f)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Current code may end up dereferencing null pointers in case
memory allocations fail in ams_init(). Handle this with proper
error handling.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit e4dca88)
Volume has multiple data arrays sized to SOF_IPC_MAX_CHANNELS
and code that uses these arrays without bounds checks (like
volume_ramp()).

Add a sanity check to volume_prepare() to ensure channels
count is never set to a higher value.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit e576721)
If the max_block_count attribute is zero, this may lead to
division by zero error. Handle this explicitly but reporting
error if max_block_count is zero.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
(cherry picked from commit 82ae105)
This will fix NULL dereference in ipc4_process_chain_dma()

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
(cherry picked from commit 1319163)
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
Copy link
Collaborator Author

kv2019i commented Mar 15, 2023

Known alsabat fail in https://sof-ci.01.org/sofpr/PR7283/build4673/devicetest/index.html, otherwise CI is clean, proceeding with merge. All patches already reviewed in mainline.

@kv2019i kv2019i merged commit c53ddec into thesofproject:stable-v2.5 Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants