| Message ID | 20261107160827257FwoXZMjcThgcfD-ZPfKsk@zte.com.cn (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27314-sunxi=pue.re@lists.linux.dev>
X-Original-To: noreply@patchwork.local
Delivered-To: noreply@patchwork.local
Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
by mxe881.netcup.net (Postfix) with ESMTPS id F1B5B1C6EF6
for <noreply@patchwork.local>; Sat, 7 Nov 2026 09:10:44 +0100 (CET)
Authentication-Results: mxe881;
spf=pass (sender IP is 104.64.211.4)
smtp.mailfrom=linux-sunxi+bounces-27314-noreply=patchwork.local@lists.linux.dev
smtp.helo=sin.lore.kernel.org
Received-SPF: pass (mxe881: domain of lists.linux.dev designates 104.64.211.4
as permitted sender) client-ip=104.64.211.4;
envelope-from=linux-sunxi+bounces-27314-noreply=patchwork.local@lists.linux.dev;
helo=sin.lore.kernel.org;
Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org
[100.77.114.92])
by sin.lore.kernel.org (Postfix) with ESMTP id 1A97F314FE
for <noreply@patchwork.local>; Sat, 7 Nov 2026 08:08:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1794038914;
b=ufUD+eMCNKKhn8uHUb2bF/8WxznVmFZrID7sagd0opYPD+h0DxIVoLra0e5dlu9PwU+H
ad2fLC4sXFSA9c6VOAdeIth0+sCpYGfPJntUXi3lCS9ekRH4MLVajZeStxH6vJZFX+1Yj
meLhCEgB0Nohu4pM/4QMysC/0J2UN98EVLewQgzX9x8EyvEz9U3SqT7ZB+0rgnazujcfn
5qkTicWOFT/YFVR8D7L2ShDPNWt0l5Qgwmf6NruAFyTFlZe48u7D+ecEfpfhCbBPOO/k1
jbaF9dX5Jh+p0GIm/h0cyT9KQor/AUxWRX9rLOWuxQ/UOmOsvezoKHs6raZBrvJWauw==
ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794038914;
h=X-Original-To:Received:DMARC-Filter:Received:Received:Received:
X-Zmail-TransId:X-Mailer:Message-ID:In-Reply-To:References:Date:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:Mime-Version:From:To:Cc:
Subject:Content-Type:X-MAIL:X-TLS:X-ENVELOPE-SENDER:X-SOURCE-IP:
X-CLEAN:X-Fangmail-Anti-Spam-Filtered:X-Fangmail-MID-QID;
bh=5dGP7OsYZrgZld9I1X847oOXXK6extHaSO2lUmdQfn4=;
b=Omk7QxeL9g+DWR2DJnyKxozcf94VxDlkvqIORWGM0W0ZGVUll4G4wZMOUg8l5ffgy9P+
vQqwoDV+rRuXZDWTSSQvyOJKvpV5KRW1g9zh9iAcVNkHPY3UfVqLfLVnGOAU+NWwEOYcG
2qIqmtPxbwbCQEfQUuQFAL12adzxwll5Zpk8crCdDrBsTWnTqTPgkpWUvoQq9aAQN4oTt
YSN9RWuBj9zdmutWyFJb4jSOPEii7dgeZmywCfQ2n4GEUX5Yy/wWKPykr++bxFvngkcAA
aGc/oU/Uv7a/oKgKzcy6xDFmdH21w8+efr8pAGVXqe7OeyMjZZRzQrLfU1knV9IAopQ==
ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=zte.com.cn;
spf=pass smtp.mailfrom=zte.com.cn;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EBC63606D81E;
Sat, 7 Nov 2026 08:08:33 +0000 (UTC)
X-Original-To: linux-sunxi@lists.linux.dev
Authentication-Results: smtp.subspace.kernel.org;
arc=none smtp.remote-ip=183.62.165.209
ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794038913;
b=mx8/Q91X0Kth5Bg+RHBT64Wk2vmjPBBreIwSMYwETw+ge4J+Mwdznpuytep6EH4aYxAM
2DdbKWcvNx/mTUjpDrCyaTIqIACm2636ssLoYgjNh4jC/VuvnB8v7GCy1LjQVErV6OJ1O
aiKXExI9W/Mbwk9Rx4fsey1Dogyh+YfAmuVseWSMcmSnyN0q2Rglw58cLKoPcHk2fSQg9
wm0ONrsRiiOiaO6PBaWHl7bSNfJdTzj3GhU59n04s5I7VVG1PVyJ5V7+vBt/zHlgyRKAE
+v0ahpJPFFpQtsICeJKZO89RDuzeZU2S0wil8IH8ECX0cfEFIfnsDCEE9CrPXTQ0jhA==
ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794038913;
h=DMARC-Filter:Received:Received:Received:X-Zmail-TransId:X-Mailer:
Message-ID:In-Reply-To:References:Date:Mime-Version:From:To:Cc:
Subject:Content-Type:X-MAIL:X-TLS:X-ENVELOPE-SENDER:X-SOURCE-IP:
X-CLEAN:X-Fangmail-Anti-Spam-Filtered:X-Fangmail-MID-QID;
bh=5dGP7OsYZrgZld9I1X847oOXXK6extHaSO2lUmdQfn4=;
b=LD4546G5YuU9n3v6D20g7wmZSQx4aDqmFx3+bKQfVTSwChtWF5+QjKg3ZPS3tJwqa2du
nzZcyeR4rIc2jUTNfPBGDEIDAowax9cZix8BgYsh7oIgibsdU8p2nhH77HCDOYdk/IZIM
0SL7+mkDUxi7lW7dtQLOMUVJqVfsFM+WIopnxWROsuu57FArLgk/HHYiZbrEGefzAC8nD
gVw3FSzk4tTnnKn8zaSJDwjudQEn9bsTWJgGiZqnDzzJy2//5o2hjchZlhcOvXfG6/5gu
MWrWIaOf0OFe0kiMWRYxYn/IOBq+bfKAhx0HZ5b+yeABhPHMNaHeo1mLWIXckw19CuQ==
ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=zte.com.cn;
spf=pass smtp.mailfrom=zte.com.cn;
arc=none smtp.remote-ip=183.62.165.209
Received: from mxct.zte.com.cn (mxct.zte.com.cn [183.62.165.209])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest
SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D7A5606D83F
for <linux-sunxi@lists.linux.dev>; Sat, 7 Nov 2026 08:08:33 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5D7A5606D83F
Authentication-Results: smtp.subspace.kernel.org;
dmarc=pass (p=none dis=none) header.from=zte.com.cn
Authentication-Results: smtp.subspace.kernel.org;
spf=pass smtp.mailfrom=zte.com.cn
Received: from mse-fl1.zte.com.cn (unknown [10.5.228.132])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519 server-signature RSA-PSS (2048 bits) server-digest
SHA256)
(No client certificate requested)
by mxct.zte.com.cn (FangMail) with ESMTPS id 4jM7wB3t1tz57HS1;
Sat, 07 Nov 2026 16:08:26 +0800 (CST)
Received: from xaxapp02.zte.com.cn ([10.88.97.241])
by mse-fl1.zte.com.cn with SMTP id 6A788OUH022866;
Sat, 7 Nov 2026 16:08:25 +0800 (+08)
(envelope-from shao.mingyin@zte.com.cn)
Received: from mapi (xaxapp02[null])
by mapi (Zmail) with MAPI id mid32;
Sat, 7 Nov 2026 16:08:27 +0800 (CST)
X-Zmail-TransId: 2afa6aeedc7b7b3-93351
X-Mailer: Zmail v1.0
Message-ID: <20261107160827257FwoXZMjcThgcfD-ZPfKsk@zte.com.cn>
In-Reply-To: <20261107160815352Q4eO0zXOX0KF5AwEbOJ6f@zte.com.cn>
References: 20261107160815352Q4eO0zXOX0KF5AwEbOJ6f@zte.com.cn
Date: Sat, 7 Nov 2026 16:08:27 +0800 (CST)
X-Mailing-List: linux-sunxi@lists.linux.dev
List-Id: <linux-sunxi.lists.linux.dev>
List-Post: <mailto:linux-sunxi@lists.linux.dev>
List-Help: <mailto:linux-sunxi+help@lists.linux.dev>
List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev>
List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev>
List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev>
Precedence: list
Mime-Version: 1.0
From: <shao.mingyin@zte.com.cn>
To: <broonie@kernel.org>, <linux-sound@vger.kernel.org>
Cc: <lgirdwood@gmail.com>, <heiko@sntech.de>,
<linux-rockchip@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>, <wens@kernel.org>,
<jernej.skrabec@gmail.com>, <samuel@sholland.org>,
<linux-sunxi@lists.linux.dev>, <kuninori.morimoto.gx@renesas.com>,
<linux-renesas-soc@vger.kernel.org>, <srini@kernel.org>,
<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: =?utf-8?q?=5BPATCH_5/5=5D_ASoC=3A_rsnd=3A_fix_SSIU_node_reference_l?=
=?utf-8?q?eak_in_rsnd=5Fdma=5Fof=5Fpath?=
Content-Type: text/plain;
charset="UTF-8"
X-MAIL: mse-fl1.zte.com.cn 6A788OUH022866
X-TLS: YES
X-ENVELOPE-SENDER: shao.mingyin@zte.com.cn
X-SOURCE-IP: 10.5.228.132 unknown Sat, 07 Nov 2026 16:08:26 +0800
X-CLEAN: YES
X-Fangmail-Anti-Spam-Filtered: true
X-Fangmail-MID-QID: 6AEEDC7A.000/4jM7wB3t1tz57HS1
X-MORS-Enabled: yes
X-MORS-DOMAIN: patchwork.local
X-MORS-HOSTING: hosting172546
X-MORS-USER: hosting172546
X-getmail-retrieved-from-mailbox: INBOX
|
| Series |
ASoC: fix error-path leaks and a NULL dereference
|
|
Commit Message
shao.mingyin@zte.com.cn
Nov. 7, 2026, 8:08 a.m. UTC
From: Shao Mingyin <shao.mingyin@zte.com.cn> rsnd_ssiu_of_node() returns the child node obtained by of_get_child_by_name(), which holds a reference. rsnd_dma_of_path() only tests that node and never drops the reference, so every DMA path setup leaks the SSIU node. Put the node after the SSIU branch has used it. Fixes: 4e7788fb8018 ("ASoC: rsnd: add SSIU BUSIF support") Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> ---
Comments
Hi > From: Shao Mingyin <shao.mingyin@zte.com.cn> > > rsnd_ssiu_of_node() returns the child node obtained by > of_get_child_by_name(), which holds a reference. rsnd_dma_of_path() > only tests that node and never drops the reference, so every DMA path > setup leaks the SSIU node. > > Put the node after the SSIU branch has used it. > > Fixes: 4e7788fb8018 ("ASoC: rsnd: add SSIU BUSIF support") > Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> > --- Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Thank you for your help !! Best regards --- Kuninori Morimoto
diff --git a/sound/soc/renesas/rcar/dma.c b/sound/soc/renesas/rcar/dma.c index 793dd4adbe5c..ece23ef5e56c 100644 --- a/sound/soc/renesas/rcar/dma.c +++ b/sound/soc/renesas/rcar/dma.c @@ -791,6 +791,7 @@ static void rsnd_dma_of_path(struct rsnd_mod *this, struct rsnd_mod *mod_start, *mod_end; struct rsnd_priv *priv = rsnd_mod_to_priv(this); struct device *dev = rsnd_priv_to_dev(priv); + struct device_node *ssiu_np; int nr, i, idx; /* @@ -803,13 +804,15 @@ static void rsnd_dma_of_path(struct rsnd_mod *this, * rsnd_ssiu_dma_req() * rsnd_ssi_dma_req() */ - if (rsnd_ssiu_of_node(priv)) { + ssiu_np = rsnd_ssiu_of_node(priv); + if (ssiu_np) { struct rsnd_mod *ssiu = rsnd_io_to_mod_ssiu(io); /* use SSIU */ ssi = ssiu; if (this == rsnd_io_to_mod_ssi(io)) this = ssiu; + of_node_put(ssiu_np); } else { /* keep compatible, use SSI */ ssi = rsnd_io_to_mod_ssi(io);