]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: Intel: avs: Do not share the name pointer between components
authorCezary Rojewski <cezary.rojewski@intel.com>
Mon, 18 Aug 2025 10:41:25 +0000 (12:41 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 18 Aug 2025 12:10:07 +0000 (13:10 +0100)
commit4dee5c1cc439b0d5ef87f741518268ad6a95b23d
tree195f2700c3af49d11bd9924f57140710f4ddd00b
parentdf36e5c197f31a105b8c8a70f13ebdf3a4c019d5
ASoC: Intel: avs: Do not share the name pointer between components

By sharing 'name' directly, tearing down components may lead to
use-after-free errors. Duplicate the name to avoid that.

At the same time, update the order of operations - since commit
cee28113db17 ("ASoC: dmaengine_pcm: Allow passing component name via
config") the framework does not override component->name if set before
invoking the initializer.

Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20250818104126.526442-4-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/avs/pcm.c