]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ASoC: topology: Fix kcontrol name string handling
authorLiam Girdwood <liam.r.girdwood@linux.intel.com>
Tue, 27 Mar 2018 11:04:04 +0000 (12:04 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 15:48:40 +0000 (11:48 -0400)
commit9347e33fc8a76d495450926ee07fe799dbbb6230
treeaf07a155a4205eb00b8c8a62fcccbecf0e9f4dcc
parentd8f3dfdf1e5dc12b3df6d20e5ed96af9fbbbe60e
ASoC: topology: Fix kcontrol name string handling

BugLink: http://bugs.launchpad.net/bugs/1773233
commit 267e2c6fd7ca3d4076d20f9d52d49dc91addfe9d upstream.

Fix the topology kcontrol string handling so that string pointer
references are strdup()ed instead of being copied. This fixes issues
with kcontrol templates on the stack or ones that are freed. Remember
and free the strings too when topology is unloaded.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Acked-by: Khalid Elmously <khalid.elmously@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
sound/soc/soc-topology.c