From: Mark Brown Date: Fri, 29 Oct 2021 20:53:39 +0000 (+0100) Subject: Merge series "ASoC: Sanity checks and soc-topology updates" from Cezary Rojewski... X-Git-Tag: v6.1-rc5~2159^2~59^2~33 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=956ac4f1f53c58f87f38fd79d4c87e9146245c09;p=platform%2Fkernel%2Flinux-starfive.git Merge series "ASoC: Sanity checks and soc-topology updates" from Cezary Rojewski : Couple of soc-topology related changes and a use-after-free fix. Said fix and two sanity checks for soc-topology lead the way. While the use-after-free is quite obvious, the sanity checks are here to cover for cases where user malformed the topology file -or- access to filesystem somehow got interrupted during copy operation. We shouldn't be reading outside the file boundary. Afterward a change to soc_tplg_add_kcontrol(): device being passed to soc_tplg_add_dcontrol() from comp->dev to tplg->dev which corrects dev_xxx() invoked later on. Also, device used for topology memory allocations from component->dev to component->card->dev so memory gets freed each time card device (usually platform device) is removed rather than the component device what may happen less frequently. Dummy component gets smarter and no longer overrides hw_params if there are other components accociated with related struct snd_soc_pcm_runtime instance. Amadeusz Sławiński (5): ASoC: core: Remove invalid snd_soc_component_set_jack call ASoC: topology: Check for dapm widget completeness ASoC: topology: Use correct device for prints ASoC: topology: Change topology device to card device ASoC: Stop dummy from overriding hwparams Cezary Rojewski (1): ASoC: topology: Add header payload_size verification sound/soc/soc-core.c | 3 --- sound/soc/soc-topology.c | 34 ++++++++++++++++++++++++++++++---- sound/soc/soc-utils.c | 13 +++++++++++++ 3 files changed, 43 insertions(+), 7 deletions(-) -- 2.25.1 --- 956ac4f1f53c58f87f38fd79d4c87e9146245c09