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: <20251201093419.24474-4-johan@kernel.org>
Date: Mon,  1 Dec 2025 10:34:19 +0100
From: Johan Hovold <johan@...nel.org>
To: Srinivas Kandagatla <srini@...nel.org>,
	Mark Brown <broonie@...nel.org>
Cc: Liam Girdwood <lgirdwood@...il.com>,
	Jaroslav Kysela <perex@...ex.cz>,
	Takashi Iwai <tiwai@...e.com>,
	linux-sound@...r.kernel.org,
	linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Johan Hovold <johan@...nel.org>,
	Neil Armstrong <neil.armstrong@...aro.org>
Subject: [PATCH 3/3] ASoC: codecs: wcd939x: fix OF node leaks on probe failure

The component match entry release function will drop the references
taken while looking up the soundwire OF nodes when the platform device
is unbound.

Drop the additional references taken to avoid leaking them on probe
failure (e.g. probe deferral) and on driver unbind.

Fixes: 10f514bd172a ("ASoC: codecs: Add WCD939x Codec driver")
Cc: Neil Armstrong <neil.armstrong@...aro.org>
Signed-off-by: Johan Hovold <johan@...nel.org>
---
 sound/soc/codecs/wcd939x.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c
index e74e6f013131..4f3be55370e2 100644
--- a/sound/soc/codecs/wcd939x.c
+++ b/sound/soc/codecs/wcd939x.c
@@ -3526,7 +3526,6 @@ static int wcd939x_add_slave_components(struct wcd939x_priv *wcd939x,
 		return -ENODEV;
 	}
 
-	of_node_get(wcd939x->rxnode);
 	component_match_add_release(dev, matchptr, component_release_of,
 				    component_compare_of, wcd939x->rxnode);
 
@@ -3535,7 +3534,7 @@ static int wcd939x_add_slave_components(struct wcd939x_priv *wcd939x,
 		dev_err(dev, "%s: Tx-device node not defined\n", __func__);
 		return -ENODEV;
 	}
-	of_node_get(wcd939x->txnode);
+
 	component_match_add_release(dev, matchptr, component_release_of,
 				    component_compare_of, wcd939x->txnode);
 	return 0;
-- 
2.51.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ