summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorKees Cook <kees+treewide@kernel.org>2026-09-17 14:14:04 -0700
committerMark Brown <broonie@kernel.org>2026-09-18 17:45:11 +0100
commit8633243a494bb78ed92cdd0339bb67ed3d08c020 (patch)
tree309f45c1c3286b2dc4a28c8e86d0fb440136595c /tools/perf/scripts/python/stackcollapse.py
parentebdc596c42626d1a6dcbc7cd7ad3f842b2cb2c70 (diff)
ASoC: rockchip: rk3399_gru_sound: Allocate dai_link with ARRAY_SIZE()
In preparation for making the devm_kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) This is allocating a copy of rockchip_dais, which is an array of struct snd_soc_dai_link, but the size was taken from the whole array, which would make the allocation type a pointer to the array rather than the "struct snd_soc_dai_link *" being assigned. Allocate ARRAY_SIZE-many entries instead. The resulting allocation size is the same. Build tested ARCH=x86_64 allmodconfig with GCC 16.2.0: sound/soc/rockchip/rk3399_gru_sound.o Assisted-by: LLM coccinelle Signed-off-by: Kees Cook <kees+treewide@kernel.org> Link: https://patch.msgid.link/20260917211403.i.984-kees@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions