Skip to content

Commit 88732a1

Browse files
kv2019ilgirdwood
authored andcommitted
zephyr: syscall: sof_dma: initialize all fields of dma_config
z_vrfy_sof_dma_config() only passes allowed fields of dma_config struct to kernel. Add initialization of the stack dma_config object kern_cfg to ensure the skipped fields are set to a known state. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 98e2fc6 commit 88732a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

zephyr/syscall/sof_dma.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,8 @@ static inline int z_vrfy_sof_dma_config(struct sof_dma *dma, uint32_t channel,
190190
struct dma_config *config)
191191
{
192192
struct dma_block_config *blk_cfgs;
193-
struct dma_config kern_cfg, user_cfg;
193+
struct dma_config kern_cfg = { 0 };
194+
struct dma_config user_cfg;
194195
int ret;
195196

196197
K_OOPS(!sof_dma_is_valid(dma));

0 commit comments

Comments
 (0)