Patch "ASoC: imx-audmix: Add NULL check in imx_audmix_probe" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    ASoC: imx-audmix: Add NULL check in imx_audmix_probe

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     asoc-imx-audmix-add-null-check-in-imx_audmix_probe.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit bdc3094c3147f1ef2ca5d2a333c1cd9ddf516cf6
Author: Charles Han <hanchunchao@xxxxxxxxxx>
Date:   Mon Nov 18 16:45:53 2024 +0800

    ASoC: imx-audmix: Add NULL check in imx_audmix_probe
    
    [ Upstream commit e038f43edaf0083f6aa7c9415d86cf28dfd152f9 ]
    
    devm_kasprintf() can return a NULL pointer on failure,but this
    returned value in imx_audmix_probe() is not checked.
    Add NULL check in imx_audmix_probe(), to handle kernel NULL
    pointer dereference error.
    
    Fixes: 05d996e11348 ("ASoC: imx-audmix: Split capture device for audmix")
    Signed-off-by: Charles Han <hanchunchao@xxxxxxxxxx>
    Link: https://patch.msgid.link/20241118084553.4195-1-hanchunchao@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c
index 6fbcf33fd0dea..8e7b75cf64db4 100644
--- a/sound/soc/fsl/imx-audmix.c
+++ b/sound/soc/fsl/imx-audmix.c
@@ -275,6 +275,9 @@ static int imx_audmix_probe(struct platform_device *pdev)
 		/* Add AUDMIX Backend */
 		be_name = devm_kasprintf(&pdev->dev, GFP_KERNEL,
 					 "audmix-%d", i);
+		if (!be_name)
+			return -ENOMEM;
+
 		priv->dai[num_dai + i].cpus	= &dlc[1];
 		priv->dai[num_dai + i].codecs	= &snd_soc_dummy_dlc;
 




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux