Skip to content

ASoC: Sanity checks and soc-topology updates

Cezary Rojewski alsa-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6ASoC: core: Remove invalid snd_soc_component_set_jack callsound/soc/soc-core.c+0 -30 replies
2/6ASoC: topology: Add header payload_size verificationsound/soc/soc-topology.c+9 -00 replies
3/6ASoC: topology: Check for dapm widget completenesssound/soc/soc-topology.c+17 -00 replies
4/6ASoC: topology: Use correct device for printssound/soc/soc-topology.c+1 -10 replies
5/6ASoC: topology: Change topology device to card devicesound/soc/soc-topology.c+3 -30 replies
6/6ASoC: Stop dummy from overriding hwparamssound/soc/soc-utils.c+13 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] ASoC: Sanity checks and soc-topology updates

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(-)
Signature · 1 line
2.25.1