Searched hist:dd9f9cc1e6b9391140afa5cf27bb47c9e2a08d02 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/include/sound/ |
H A D | soc.h | diff dd9f9cc1e6b9391140afa5cf27bb47c9e2a08d02 Fri Sep 29 05:32:43 CDT 2023 Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> ASoC: core: Do not call link_exit() on uninitialized rtd objects
On init we have sequence:
for_each_card_prelinks(card, i, dai_link) { ret = snd_soc_add_pcm_runtime(card, dai_link);
ret = init_some_other_things(...); if (ret) goto probe_end:
for_each_card_rtds(card, rtd) { ret = soc_init_pcm_runtime(card, rtd);
probe_end:
while on exit: for_each_card_rtds(card, rtd) snd_soc_link_exit(rtd);
If init_some_other_things() step fails due to error we end up with not fully setup rtds and try to call snd_soc_link_exit on them, which depending on contents on .link_exit handler, can end up dereferencing NULL pointer.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929103243.705433-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
|
/openbmc/linux/sound/soc/ |
H A D | soc-core.c | diff dd9f9cc1e6b9391140afa5cf27bb47c9e2a08d02 Fri Sep 29 05:32:43 CDT 2023 Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> ASoC: core: Do not call link_exit() on uninitialized rtd objects
On init we have sequence:
for_each_card_prelinks(card, i, dai_link) { ret = snd_soc_add_pcm_runtime(card, dai_link);
ret = init_some_other_things(...); if (ret) goto probe_end:
for_each_card_rtds(card, rtd) { ret = soc_init_pcm_runtime(card, rtd);
probe_end:
while on exit: for_each_card_rtds(card, rtd) snd_soc_link_exit(rtd);
If init_some_other_things() step fails due to error we end up with not fully setup rtds and try to call snd_soc_link_exit on them, which depending on contents on .link_exit handler, can end up dereferencing NULL pointer.
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20230929103243.705433-2-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
|