All of lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] [PATCH 0/2] ASoC: topology: Fix memory leaks with ABI version mismatch
@ 2020-02-07 18:53 Dragos Tarcatu
  2020-02-07 18:53 ` [alsa-devel] [PATCH 1/2] ASoC: topology: Fix memleak in soc_tplg_link_elems_load() Dragos Tarcatu
  2020-02-07 18:53 ` [alsa-devel] [PATCH 2/2] ASoC: topology: Fix memleak in soc_tplg_manifest_load() Dragos Tarcatu
  0 siblings, 2 replies; 5+ messages in thread
From: Dragos Tarcatu @ 2020-02-07 18:53 UTC (permalink / raw)
  To: alsa-devel
  Cc: Dragos Tarcatu, mengdong.lin, pierre-louis.bossart, tiwai, broonie

The topology loader in soc-topology.c is currently accepting ABI
version mismatches for some topology components in order to keep
backwards compatibility with ABIv4. When dealing with these ABI
mismatch situations, temporary copies of the v4 objects are
allocated and passed on to the right driver topology handlers.
After that they're supposed to be freed.

However, memory leaks are currently possible in
soc_tplg_link_elems_load() and also soc_tplg_manifest_load().

These patches fix these.

I've originally created a PR on github for SOF at:
   https://github.com/thesofproject/linux/pull/1771
as my impression was this can affect older SOF toplogies.

But as it turns out this may impact Skylake instead.

Dragos Tarcatu (2):
  ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
  ASoC: topology: Fix memleak in soc_tplg_manifest_load()

 sound/soc/soc-topology.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

-- 
2.17.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-02-19 21:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-07 18:53 [alsa-devel] [PATCH 0/2] ASoC: topology: Fix memory leaks with ABI version mismatch Dragos Tarcatu
2020-02-07 18:53 ` [alsa-devel] [PATCH 1/2] ASoC: topology: Fix memleak in soc_tplg_link_elems_load() Dragos Tarcatu
2020-02-19 20:57   ` Applied "ASoC: topology: Fix memleak in soc_tplg_link_elems_load()" to the asoc tree Mark Brown
2020-02-07 18:53 ` [alsa-devel] [PATCH 2/2] ASoC: topology: Fix memleak in soc_tplg_manifest_load() Dragos Tarcatu
2020-02-19 20:56   ` Applied "ASoC: topology: Fix memleak in soc_tplg_manifest_load()" to the asoc tree Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.