]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: simple-card-utils: Allocate link info structure on heap
authorThierry Reding <treding@nvidia.com>
Mon, 19 Apr 2021 16:41:17 +0000 (18:41 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 20 Apr 2021 12:47:30 +0000 (13:47 +0100)
commit39d71d4d432fc3e905640fba7c84f6c48fdcf18d
treebd2ec434df0717514d8fc8c03e07fa478067bb86
parentb9335add528786762ba6ed2f8bfc7effc7a435ee
ASoC: simple-card-utils: Allocate link info structure on heap

struct link_info can grow fairly large and may cause the stack frame
size to be exceeded when allocated on the stack. Some architectures
such as 32-bit ARM, RISC-V or PowerPC have small stack frames where
this causes a compiler warning, so allocate these structures on the
heap instead of the stack.

Fixes: 2ad605b07fd9 ("ASoC: simple-card-utils: Increase maximum number of links to 128")
Reported-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20210419164117.1422242-1-thierry.reding@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card.c
sound/soc/generic/simple-card.c