WSL2-Linux-Kernel/sound/soc/fsl
Nikita Zhandarovich 9fc2e7f2cf ASoC: fsl_asrc_dma: fix potential null-ptr-deref
commit 86a24e99c9 upstream.

dma_request_slave_channel() may return NULL which will lead to
NULL pointer dereference error in 'tmp_chan->private'.

Correct this behaviour by, first, switching from deprecated function
dma_request_slave_channel() to dma_request_chan(). Secondly, enable
sanity check for the resuling value of dma_request_chan().
Also, fix description that follows the enacted changes and that
concerns the use of dma_request_slave_channel().

Fixes: 706e2c8811 ("ASoC: fsl_asrc_dma: Reuse the dma channel if available in Back-End")
Co-developed-by: Natalia Petrova <n.petrova@fintech.ru>
Signed-off-by: Nikita Zhandarovich <n.zhandarovich@fintech.ru>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230417133242.53339-1-n.zhandarovich@fintech.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 13:51:56 +02:00
..
Kconfig Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.14 2021-05-25 16:44:26 +01:00
Makefile ASoC: imx-card: Add imx-card machine driver 2021-05-20 17:57:30 +01:00
efika-audio-fabric.c ASoC: fsl: efika-audio-fabric: use modern dai_link style 2019-06-06 21:41:08 +01:00
eukrea-tlv320.c ASoC: eureka-tlv320: Hold reference returned from of_find_xxx API 2022-10-26 12:34:55 +02:00
fsl-asoc-card.c ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets 2023-02-01 08:27:18 +01:00
fsl_asrc.c ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N 2022-12-02 17:40:59 +01:00
fsl_asrc.h ASoC: fsl_asrc: Move common definition to fsl_asrc_common 2020-04-21 16:34:09 +01:00
fsl_asrc_common.h ASoC: fsl_asrc_dma: Fix data copying speed issue with EDMA 2020-06-12 14:18:04 +01:00
fsl_asrc_dma.c ASoC: fsl_asrc_dma: fix potential null-ptr-deref 2023-04-26 13:51:56 +02:00
fsl_aud2htx.c ASoC: fsl_aud2htx: Use devm_platform_get_and_ioremap_resource() 2021-06-21 13:03:12 +01:00
fsl_aud2htx.h ASoC: fsl_aud2htx: Add aud2htx module driver 2020-11-05 17:06:16 +00:00
fsl_audmix.c ASoC: fsl_audmix: Don't use devm_regmap_init_mmio_clk 2021-03-24 19:49:31 +00:00
fsl_audmix.h ASoC: fsl_audmix: Add spin lock to protect tdms 2019-11-11 13:01:37 +00:00
fsl_dma.c ASoC: fsl_dma: Use managed buffer allocation 2021-08-04 08:09:09 +02:00
fsl_dma.h ASoC: fsl-dma: Switch to SPDX identifier 2019-04-08 13:51:01 +07:00
fsl_easrc.c ASoC: fsl_easrc: use snd_pcm_format_t type for sample_format 2022-08-17 14:24:10 +02:00
fsl_easrc.h ASoC: fsl_easrc: use snd_pcm_format_t type for sample_format 2022-08-17 14:24:10 +02:00
fsl_esai.c ASoC: fsl_asrc fsl_esai fsl_sai: allow CONFIG_PM=N 2022-12-02 17:40:59 +01:00
fsl_esai.h ASoC: fsl_esai: Switch to SPDX identifier 2018-05-03 10:29:05 +09:00
fsl_micfil.c ASoC: fsl_micfil: Correct the number of steps on SX controls 2023-02-01 08:27:16 +01:00
fsl_micfil.h ASoC: Add MICFIL SoC Digital Audio Interface driver. 2019-01-07 17:00:55 +00:00
fsl_mqs.c ASoC: fsl_mqs: fix MODULE_ALIAS 2022-01-27 11:04:18 +01:00
fsl_rpmsg.c ASoC: fsl_rpmsg: Check -EPROBE_DEFER for getting clocks 2021-08-18 13:55:18 +01:00
fsl_rpmsg.h ASoC: fsl_rpmsg: Add CPU DAI driver for audio base on rpmsg 2021-03-25 13:58:07 +00:00
fsl_sai.c ASoC: fsl_sai: initialize is_dsp_mode flag 2023-03-10 09:39:22 +01:00
fsl_sai.h ASoC: fsl_sai: Update to modern clocking terminology 2023-03-10 09:39:22 +01:00
fsl_spdif.c ASoC: fsl_spdif: Disable TX clock when stop 2022-04-08 14:23:22 +02:00
fsl_spdif.h ASoC: fsl_spdif: add support for enabling raw capture mode 2021-05-10 13:05:31 +01:00
fsl_ssi.c ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC 2023-02-01 08:27:17 +01:00
fsl_ssi.h ASoC: fsl: no need to check return value of debugfs_create functions 2019-06-14 16:37:48 +01:00
fsl_ssi_dbg.c ASoC: fsl: fsl_ssi_dbg: remove spurious kernel-doc comment start 2020-07-03 16:09:24 +01:00
fsl_utils.c ASoC: fsl: mpc8610_hpcd/p1022_ds/p1022_rdk: use modern dai_link style 2019-06-06 21:42:35 +01:00
fsl_utils.h ASoC: fsl_utils: Switch to SPDX identifier 2018-07-24 16:59:03 +01:00
fsl_xcvr.c ASoC: fsl_xcvr: Fix channel swap issue with ARC 2021-09-21 13:23:36 +01:00
fsl_xcvr.h ASoC: fsl_xcvr: Add XCVR ASoC CPU DAI driver 2020-10-26 15:45:31 +00:00
imx-audio-rpmsg.c ASoC: imx-audio-rpmsg: use module_rpmsg_driver to simplify the code 2021-06-03 13:59:57 +01:00
imx-audmix.c ASoC: fsl: remove unnecessary oom message 2021-06-23 11:49:38 +01:00
imx-audmux.c ASoC: imx-audmux: Silence a clang warning 2022-08-17 14:24:02 +02:00
imx-audmux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
imx-card.c ASoC: imx-card: Fix refcount issue with of_node_put 2022-10-05 10:39:41 +02:00
imx-es8328.c ASoC: imx-es8328: Fix error return code in imx_es8328_probe() 2022-04-08 14:23:22 +02:00
imx-hdmi.c ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe 2022-06-09 10:22:56 +02:00
imx-pcm-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
imx-pcm-fiq.c ASoC: fsl: imx-pcm-fiq: Use managed buffer allocation 2021-08-04 08:08:42 +02:00
imx-pcm-rpmsg.c ASoC: fsl: imx-pcm-rpmsg: Use managed buffer allocation 2021-08-04 08:08:49 +02:00
imx-pcm-rpmsg.h ASoC: imx-pcm-rpmsg: Fix warning of incorrect type in assignment 2021-05-10 13:05:38 +01:00
imx-pcm.h ASoC: imx-pcm: Switch to SPDX identifier 2019-04-08 13:47:44 +07:00
imx-rpmsg.c ASoC: imx-rpmsg: change dev_err to dev_err_probe for -EPROBE_DEFER 2021-08-25 14:15:47 +01:00
imx-sgtl5000.c ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe 2022-06-09 10:22:56 +02:00
imx-spdif.c ASoC: fsl: Use dev_err_probe() helper 2022-06-09 10:22:56 +02:00
imx-ssi.h ASoC: imx-ssi: Switch to SPDX identifier 2019-04-08 13:53:35 +07:00
mpc5200_dma.c ASoC: mpc5200: Use managed buffer allocation 2021-08-04 08:09:16 +02:00
mpc5200_dma.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mpc5200_psc_ac97.c ASoC: soc-core: remove bus_control 2020-01-21 17:07:08 +00:00
mpc5200_psc_i2s.c ASoC: fsl: use asoc_substream_to_rtd() 2020-07-23 19:07:31 +01:00
mpc8610_hpcd.c ASoC: fsl: mpc8610: remove useless assignment 2021-03-10 13:06:42 +00:00
p1022_ds.c ASoC: fsl: p1022_ds: remove useless assignment 2021-03-10 13:06:43 +00:00
p1022_rdk.c ASoC: fsl: use asoc_substream_to_rtd() 2020-07-23 19:07:31 +01:00
pcm030-audio-fabric.c ASoC: fsl: Add missing error handling in pcm030_fabric_probe 2022-02-08 18:34:10 +01:00