- 11 12月, 2020 1 次提交
-
-
由 Amadeusz Sławiński 提交于
When we parse "values" we perform check if there is correct number of them. However similar check is missing in case of "texts", add it. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20201210152541.191728-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 13 11月, 2020 1 次提交
-
-
由 Pierre-Louis Bossart 提交于
Mirror suggested changes in alsa-lib. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20201112163100.5081-2-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 05 11月, 2020 6 次提交
-
-
由 Amadeusz Sławiński 提交于
Now that enum and mixer kcontrols are freed by resource management framework, removing kcontrol becomes one function call, so simplify code in remove_widget. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-7-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
After changing memory management to resource managed one, some of the functions became no ops, remove them as they are no longer needed. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-6-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
In order for topology to be resource managed, change all allocations to be resource managed: k*alloc -> devm_k*alloc kstrdup -> devm_kstrdup Exceptions where non resource managed allocation is left is soc_tplg_dapm_widget_create(), as it uses pointer to memory locally and frees it up after use, as well as soc_tplg_dapm_graph_elems_load(), which has temporary pointer to table of routes. After conversion all redundant calls in error and clean up paths were removed. Also removed some variables which become unneeded when there is no calls using them. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-5-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
In few places tplg->comp->dev is used, while everywhere else tplg->dev is being used. Unify those uses towards tplg->dev, as it is being set to comp->dev during initialization anyway. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-4-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
In theory topology can be loaded in multiple steps by providing index to snd_soc_tplg_component_load, however, from usability point of view it doesn't make sense, as can be seen from all current users loading topology in one go. Remove the unnecessary parameter. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-3-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
Topology API exposes snd_soc_tplg_widget_remove and snd_soc_tplg_widget_remove_all, but both are nowhere used. All current users load and unload topology as a whole. As following commits introduce resource managed memory, remove them to simplify code and reduce maintenance burden. Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20201030145427.3497990-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 17 9月, 2020 1 次提交
-
-
由 Pierre-Louis Bossart 提交于
When CONFIG_SND_CTL_VALIDATION is set, accesses to extended bytes control generate spurious error messages when the size exceeds 512 bytes, such as [ 11.224223] sof_sdw sof_sdw: control 2:0:0:EQIIR5.0 eqiir_coef_5:0: invalid count 1024 In addition the error check returns -EINVAL which has the nasty side effect of preventing applications accessing controls from working, e.g. root@plb:~# alsamixer cannot load mixer controls: Invalid argument It's agreed that the control interface has been abused since 2014, but forcing a check should not prevent existing solutions from working. This patch skips the checks conditionally if CONFIG_SND_CTL_VALIDATION is set and the byte array provided by topology is > 512. This preserves the checks for all other cases. Fixes: 1a3232d2 ('ASoC: topology: Add support for TLV bytes controls') BugLink: https://github.com/thesofproject/linux/issues/2430Reported-by: NTakashi Iwai <tiwai@suse.de> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: NJaska Uimonen <jaska.uimonen@intel.com> Signed-off-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200917103912.2565907-1-kai.vehmanen@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 08 9月, 2020 1 次提交
-
-
由 Dharageswari R 提交于
This patch adds support for write-only and read-only TLV byte kcontrols by checking for appropriate get/put IO handlers. Signed-off-by: NDharageswari R <dharageswari.r@intel.com> Reviewed-by: NGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200908092825.1813847-1-kai.vehmanen@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 24 8月, 2020 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
Replace the existing /* fall through */ comments and its variants with the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary fall-through markings when it is the case. [1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-throughSigned-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
-
- 08 7月, 2020 5 次提交
-
-
由 Pierre-Louis Bossart 提交于
Add more dev_err() logs to help trace topology load failures, since we have multiple error causes (e.g. invalid header or header that could not be loaded). Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: NRander Wang <rander.wang@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-6-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
No need to repeat the same thing multiple times when it can be done in one location. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-5-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
Since the beginning of the topology, the code continues to the next object even when an error is detected. The topology should be handled with an all-or-nothing design, loading a partially valid topology is a sure way to get bug reports that are difficult to deal with. Changing the behavior may break previous solutions and expose problems in topology files delivered in the past, so it's probably not wise to add this patch to stable branches without revalidation. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-4-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
we need to free all allocated tlvs, not just the one allocated in the loop before releasing kcontrols - other the tlvs references will leak. Fixes: 9f90af3a ('ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow') Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Pierre-Louis Bossart 提交于
When errors happens while loading graph components, the kernel oopses while trying to remove all topology components. This can be root-caused to a list pointing to memory that was already freed on error. remove_route() is already called on errors and will perform the required cleanups so there's no need to free the route memory in soc_tplg_dapm_graph_elems_load() if the route was added to the list. We do however want to free the routes allocated but not added to the list. Fixes: 7df04ea7 ('ASoC: topology: modify dapm route loading routine and add dapm route unloading') Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200707203749.113883-2-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 15 6月, 2020 1 次提交
-
-
由 Pierre-Louis Bossart 提交于
Use devm_ to avoid use-after-free KASAN reports and simplify error handling. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NBard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> BugLink: https://github.com/thesofproject/linux/issues/2186 Link: https://lore.kernel.org/r/20200612205938.26415-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 29 5月, 2020 2 次提交
-
-
由 Keyon Jie 提交于
As we have check the 'pass' in the soc_elem_pass_load(), so no need to check it again in each specific elem_load function, at the same time, the tplg->pos will be reset to the next header base when the pass is mismatched, so the increasing of the tplg->pos in these cases made no sense. Here remove all of them. Signed-off-by: NKeyon Jie <yang.jie@linux.intel.com> Tested-by: NVamshi Kerishna Gopal <vamshi.krishna.gopal@intel.com> Tested-by: NCezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200527022801.336264-3-yang.jie@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Keyon Jie 提交于
The check (tplg->pass == le32_to_cpu(hdr->type)) makes no sense as it is comparing two different enums, refine the element loading functions, and log the information when the header is being parsed in the corresponding parsing pass. Signed-off-by: NKeyon Jie <yang.jie@linux.intel.com> Tested-by: NVamshi Kerishna Gopal <vamshi.krishna.gopal@intel.com> Tested-by: NCezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: NCezary Rojewski <cezary.rojewski@intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200527022801.336264-2-yang.jie@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 16 4月, 2020 2 次提交
-
-
由 Amadeusz Sławiński 提交于
There is unnecessary semicolon after last bracket of if statement, remove it. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20200415162435.31859-1-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
As done in already existing cases, we should use le32_to_cpu macro while accessing hdr->magic. Found with sparse. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://lore.kernel.org/r/20200415162435.31859-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 09 4月, 2020 6 次提交
-
-
由 Amadeusz Sławiński 提交于
Function soc_tplg_dai_config can fail, check for and handle possible failure. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-7-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
Function pcm_new_ver can fail, so we should check it's return value and handle possible error. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-6-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
Function soc_tplg_add_route can propagate error code from callback, we should check its return value and handle fail in correct way. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-5-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
Functions soc_tplg_denum_create, soc_tplg_dmixer_create, soc_tplg_dbytes_create can fail, so their return values should be checked and error should be propagated. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-4-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
Function soc_tplg_create_tlv can fail, so we should check if it succeded or not and proceed appropriately. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-3-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Amadeusz Sławiński 提交于
kstrdup is an allocation function and it can fail, so its return value should be checked and handled appropriately. In order to check all cases, we need to modify set_stream_info to return a value, so check that everything went correctly when doing kstrdup(). Later add proper checks and error handlers. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200327204729.397-2-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 01 4月, 2020 1 次提交
-
-
由 이경택 提交于
Current topology doesn't add prefix of component to new kcontrol. Signed-off-by: NGyeongtaek Lee <gt82.lee@samsung.com> Link: https://lore.kernel.org/r/009b01d60804$ae25c2d0$0a714870$@samsung.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 13 3月, 2020 1 次提交
-
-
由 Amadeusz Sławiński 提交于
Function soc_tplg_dbytes_create(), calls soc_tplg_init_kcontrol() to perform additional driver specific initialization. While soc_tplg_init_kcontrol() ensures that component is valid before invoking ops->control_load, there is no such check at the end of soc_tplg_dbytes_create() where list_add() is used. Also in quite a few places, there is reference of tplg->comp->dapm or tplg->comp->card, without any checks for tplg->comp. In consequence of the above this may lead to referencing NULL pointer. This allows for removal of now unnecessary checks. Signed-off-by: NAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200312122239.14489-1-amadeuszx.slawinski@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2020 1 次提交
-
-
由 Kuninori Morimoto 提交于
To be more readable code, this patch adds new for_each_card_widgets() macro, and replace existing code to it. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1y2goga.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 20 2月, 2020 2 次提交
-
-
由 Dragos Tarcatu 提交于
In case of ABI version mismatch, _manifest needs to be freed as it is just a copy of the original topology manifest. However, if a driver manifest handler is defined, that would get executed and the cleanup is never reached. Fix that by getting the return status of manifest() instead of returning directly. Fixes: 583958fa ("ASoC: topology: Make manifest backward compatible from ABI v4") Signed-off-by: NDragos Tarcatu <dragos_tarcatu@mentor.com> Link: https://lore.kernel.org/r/20200207185325.22320-3-dragos_tarcatu@mentor.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Dragos Tarcatu 提交于
If soc_tplg_link_config() fails, _link needs to be freed in case of topology ABI version mismatch. However the current code is returning directly and ends up leaking memory in this case. This patch fixes that. Fixes: 593d9e52 ("ASoC: topology: Add support to configure existing physical DAI links") Signed-off-by: NDragos Tarcatu <dragos_tarcatu@mentor.com> Link: https://lore.kernel.org/r/20200207185325.22320-2-dragos_tarcatu@mentor.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 23 1月, 2020 1 次提交
-
-
由 Jaroslav Kysela 提交于
The code which checks the return value for snd_soc_add_dai_link() call in soc_tplg_fe_link_create() moved the snd_soc_add_dai_link() call before link->dobj members initialization. While it does not affect the latest kernels, the old soc-core.c code in the stable kernels is affected. The snd_soc_add_dai_link() function uses the link->dobj.type member to check, if the link structure is valid. Reorder the link->dobj initialization to make things work again. It's harmless for the recent code (and the structure should be properly initialized before other calls anyway). The problem is in stable linux-5.4.y since version 5.4.11 when the upstream commit 76d27036 was applied. Fixes: 76d27036 ("ASoC: topology: Check return value for snd_soc_add_dai_link()") Cc: Dragos Tarcatu <dragos_tarcatu@mentor.com> Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Cc: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Cc: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: NJaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20200122190752.3081016-1-perex@perex.czSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 03 1月, 2020 1 次提交
-
-
由 Pierre-Louis Bossart 提交于
Sparse complains about a series of easy warnings, fix. Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200102195952.9465-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 25 12月, 2019 1 次提交
-
-
由 Dragos Tarcatu 提交于
remove_link() is currently calling snd_soc_remove_dai_link() after it has already freed the memory for the link name. But this is later read from snd_soc_get_pcm_runtime() causing a KASAN use-after-free warning. Reorder the cleanups to fix this issue. Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: NDragos Tarcatu <dragos_tarcatu@mentor.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20191204210447.11701-4-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 12月, 2019 1 次提交
-
-
由 Dragos Tarcatu 提交于
remove_link() is currently calling snd_soc_remove_pcm_runtime() after it has already freed the memory for the link name. But this is later read from snd_soc_get_pcm_runtime() causing a KASAN use-after-free warning. Reorder the cleanups to fix this issue. Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: NDragos Tarcatu <dragos_tarcatu@mentor.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20191218000518.5830-4-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 10 12月, 2019 4 次提交
-
-
由 Kuninori Morimoto 提交于
Now soc-core and soc-topology is using snd_soc_remove_dai_link(). It removes pcm_runtime (= rtd) and disconnect it from card. The purpose is removing pcm_runtime, not dai_link. This patch renames function name. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/875zipyq5s.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
Now soc-core and soc-topology is using snd_soc_add_dai_link(). The abstract of this function is "create pcm_runtime from dai_link information and connect it to card". Thus, "add dai_link" is wrong/confusable naming. This patch renames function name. Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/877e35yq5w.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Kuninori Morimoto 提交于
snd_soc_find_dai_link() is soc-topology specific function. We don't need to have it at soc-core. This patch moves it to soc-topology.c Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/878snlyq61.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Dragos Tarcatu 提交于
The return value of soc_tplg_pcm_create() is currently not checked in soc_tplg_pcm_elems_load(). If an error is to occur there, the topology ignores it and continues loading. Fix that by checking the status and rejecting the topology on error. Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: NDragos Tarcatu <dragos_tarcatu@mentor.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191210003939.15752-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-