Patch "ASoC: kirkwood: Fix potential NULL dereference" has been added to the 6.8-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: kirkwood: Fix potential NULL dereference

to the 6.8-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-kirkwood-fix-potential-null-dereference.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 4b2e8becd3e924a290c9d64dc36363739a22c3b2
Author: Aleksandr Mishin <amishin@xxxxxxxxxx>
Date:   Thu Mar 28 20:33:37 2024 +0300

    ASoC: kirkwood: Fix potential NULL dereference
    
    [ Upstream commit ea60ab95723f5738e7737b56dda95e6feefa5b50 ]
    
    In kirkwood_dma_hw_params() mv_mbus_dram_info() returns NULL if
    CONFIG_PLAT_ORION macro is not defined.
    Fix this bug by adding NULL check.
    
    Found by Linux Verification Center (linuxtesting.org) with SVACE.
    
    Fixes: bb6a40fc5a83 ("ASoC: kirkwood: Fix reference to PCM buffer address")
    Signed-off-by: Aleksandr Mishin <amishin@xxxxxxxxxx>
    Link: https://msgid.link/r/20240328173337.21406-1-amishin@xxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index dd2f806526c10..ef00792e1d49a 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -182,6 +182,9 @@ static int kirkwood_dma_hw_params(struct snd_soc_component *component,
 	const struct mbus_dram_target_info *dram = mv_mbus_dram_info();
 	unsigned long addr = substream->runtime->dma_addr;
 
+	if (!dram)
+		return 0;
+
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
 		kirkwood_dma_conf_mbus_windows(priv->io,
 			KIRKWOOD_PLAYBACK_WIN, addr, dram);




[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