lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250530164425.119102-4-pchelkin@ispras.ru>
Date: Fri, 30 May 2025 19:44:16 +0300
From: Fedor Pchelkin <pchelkin@...ras.ru>
To: Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Takashi Iwai <tiwai@...e.com>
Cc: Fedor Pchelkin <pchelkin@...ras.ru>,
	Jaroslav Kysela <perex@...ex.cz>,
	Vijendar Mukunda <Vijendar.Mukunda@....com>,
	Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@....com>,
	Pierre-Louis Bossart <pierre-louis.bossart@...ux.dev>,
	linux-sound@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	lvc-project@...uxtesting.org,
	stable@...r.kernel.org
Subject: [PATCH 3/3] ASoC: amd: acp3x-pdm-dma: free pdm device data on closing

Dynamic memory referenced by runtime->private_data pointer is allocated in
acp_pdm_dma_open() and needs to be freed in the corresponding ->close()
callback.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops")
Cc: stable@...r.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@...ras.ru>
---
 sound/soc/amd/renoir/acp3x-pdm-dma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c
index 95ac8c680037..6b294040e164 100644
--- a/sound/soc/amd/renoir/acp3x-pdm-dma.c
+++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c
@@ -301,9 +301,11 @@ static int acp_pdm_dma_close(struct snd_soc_component *component,
 			     struct snd_pcm_substream *substream)
 {
 	struct pdm_dev_data *adata = dev_get_drvdata(component->dev);
+	struct snd_pcm_runtime *runtime = substream->runtime;
 
 	disable_pdm_interrupts(adata->acp_base);
 	adata->capture_stream = NULL;
+	kfree(runtime->private_data);
 	return 0;
 }
 
-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ