From patchwork Sat Nov 7 08:08:21 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: shao.mingyin@zte.com.cn X-Patchwork-Id: 3917 Return-Path: X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mxe881.netcup.net (Postfix) with ESMTPS id CDCDF1C6EF0 for ; Sat, 7 Nov 2026 09:10:37 +0100 (CET) Authentication-Results: mxe881; spf=pass (sender IP is 172.105.105.114) smtp.mailfrom=linux-sunxi+bounces-27312-noreply=patchwork.local@lists.linux.dev smtp.helo=tor.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.105.105.114 as permitted sender) client-ip=172.105.105.114; envelope-from=linux-sunxi+bounces-27312-noreply=patchwork.local@lists.linux.dev; helo=tor.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 350CF36EC2 for ; Sat, 7 Nov 2026 08:08:33 +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=1794038908; b=IUVLJH1fvmbdMa+zDHZ00B1+jnFQm7YWqGhLGhp93IIMtt44WeLGr7UfYQK7oKwB62Ea UsOn0+nGKYVjB4jJOO7ATDRJ5ayG5ROm0sDxveKK4Xovwl+J9Fy5NDayaSiIevOmpztkO d4Oxg3uTyZNn4T6Ef32544u3V7FTJSaCr5c80ze0wx1YreDh0JafV9lGWdHMbRG+8J9x6 7yVGKSLcWixB5Xv9Zyp9C//360SGOGwfRF2mApjo60NxrEuw0xLqQleTLRYllOZnKIozq OBNR18RghMSmzAwJ9drbsnSz5DgDzi60MJ2ZwZMCog+QRdrcNWoqonBMkbiyrAU9NIQ== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794038908; 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=ekhsu2gD2ffd2XUnkad76rYwYpPwsHO9XjiLqW89QII=; b=ZcTv4jPUEW9QgaBZ5SXgsNM/7aqu4NCtI50LQTisFOibbwquHervht74icI6C58RzFIy HDS9GwWyVHgzfZLtOmiFO/uCcBko4dVU2IAxdeAumoPBy2AabSTwmZQOqk2+LqwTtXU2g TME+UJp5FQsY56gI/DqFej2xmV3/fZBnw07oAYpT9oz2kgfNlxmTLLQL0qkqOEKBm53cA 4ad/U20xVP82aZol4V81TRxnBYqaQtVSJd4j2TL10EfbSPTcQXFwIYxvIrIhaVYfzv6tW DYSn1cz2W0aVGnCdWvn7t27rzuLcNsi3SFGEs4OLYBEH3ppR37yLkWdF72GbJOHxLng== 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 E8E8F606D81F; Sat, 7 Nov 2026 08:08:27 +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=1794038907; b=hV+Dyk9SGsC5FI++Lb6WLJisqhJWdhRDl/zUIHBoYvAkChujWAcEHdk4UkHFrQCoUQIc s01QS45hkjb2tpYgkGcWvN7LtiVggTIo2aU8zAZaWtx7yS8RjfztueSgp9m4vlXTI1Lfe LoTlI61zDs5n+EJPxRlAwSLXyoiKpX+RuEb479PNizPJDeNib0tBves9BHipkdKvjZ0cF OE3g5h9u5dReLslX99XkI+hfJpo/pNv98Smc2m8GdydZJU9YTmptvXjuKEWtunGrVr2d4 D8uQwyhLAszHPDNG20bjWPtIa5CHNp6cXzU7lP9bSUeU4wlR6jzNmOkR0RryuiHSw/w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794038907; 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=ekhsu2gD2ffd2XUnkad76rYwYpPwsHO9XjiLqW89QII=; b=sxSv4ZcUyVmqWS/fVllN+4vvKolcDAkQItuRf6a4G5iVG8FEocDx0TMVpZWhDN9djy8d rZURWH425EjAyTS6Bkw9kIBk/DGE266rUOR/ei3+sLZ7hBdUsLnljpDcEzVLxSekJqRqh 1pKAb9qzqNjm5v180fNvFBrtbAxCoUv5a2I1/FnyfZeu16gNrg6ERCtYnJs7uh3SATyBb 6YshPTDfduNgOanH+q7Jn/8N/qQLA8XChP9OpbegGus7vt/6orC9+2bJpx11cK3E05F5A zXlr42JyifgjC8X7vf14/OR/4AhDwvro56g3gbJZpbuODy50bp1i22mEp4s3o5AQP2Q== 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 650EF606D812 for ; Sat, 7 Nov 2026 08:08:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 650EF606D812 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-fl2.zte.com.cn (unknown [10.5.228.133]) (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 4jM7w53lPSz57HS0; Sat, 07 Nov 2026 16:08:21 +0800 (CST) Received: from xaxapp04.zte.com.cn ([10.99.98.157]) by mse-fl2.zte.com.cn with SMTP id 6A788J1W096644; Sat, 7 Nov 2026 16:08:19 +0800 (+08) (envelope-from shao.mingyin@zte.com.cn) Received: from mapi (xaxapp05[null]) by mapi (Zmail) with MAPI id mid32; Sat, 7 Nov 2026 16:08:21 +0800 (CST) X-Zmail-TransId: 2afc6aeedc75063-80c13 X-Mailer: Zmail v1.0 Message-ID: <20261107160821263n_tb5YdtJX-icNTWJbOW9@zte.com.cn> In-Reply-To: <20261107160815352Q4eO0zXOX0KF5AwEbOJ6f@zte.com.cn> References: 20261107160815352Q4eO0zXOX0KF5AwEbOJ6f@zte.com.cn Date: Sat, 7 Nov 2026 16:08:21 +0800 (CST) X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 From: To: , Cc: , , , , , , , , , , , , Subject: =?utf-8?q?=5BPATCH_1/5=5D_ASoC=3A_rsnd=3A_fix_NULL_dereference_when?= =?utf-8?q?_remote_port_has_no_endpoint?= X-MAIL: mse-fl2.zte.com.cn 6A788J1W096644 X-TLS: YES X-ENVELOPE-SENDER: shao.mingyin@zte.com.cn X-SOURCE-IP: 10.5.228.133 unknown Sat, 07 Nov 2026 16:08:21 +0800 X-CLEAN: YES X-Fangmail-Anti-Spam-Filtered: true X-Fangmail-MID-QID: 6AEEDC75.000/4jM7w53lPSz57HS0 X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [6.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.105.105.114:from]; SUSPICIOUS_RECIPS(1.50)[]; SUBJ_EXCESS_BASE64(1.50)[]; DMARC_POLICY_SOFTFAIL(1.00)[zte.com.cn : SPF not aligned (relaxed), No valid DKIM,none]; MV_CASE(0.50)[]; MAILLIST(-0.18)[generic]; BAD_REP_POLICIES(0.10)[]; MIME_GOOD(-0.10)[text/plain]; HAS_LIST_UNSUB(-0.01)[]; TAGGED_RCPT(0.00)[]; FREEMAIL_CC(0.00)[gmail.com,sntech.de,lists.infradead.org,kernel.org,sholland.org,lists.linux.dev,renesas.com,vger.kernel.org]; RCPT_COUNT_TWELVE(0.00)[15]; DBL_BLOCKED_OPENRESOLVER(0.00)[tor.lore.kernel.org:helo,tor.lore.kernel.org:rdns,zte.com.cn:email]; FROM_NO_DN(0.00)[]; RCVD_COUNT_SEVEN(0.00)[7]; R_DKIM_NA(0.00)[]; FROM_NEQ_ENVFROM(0.00)[shao.mingyin@zte.com.cn,linux-sunxi@lists.linux.dev]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; R_SPF_ALLOW(0.00)[+ip4:172.105.105.114]; TO_DN_NONE(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[183.62.165.209:received,100.77.114.92:received]; FORGED_SENDER_MAILLIST(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-27312-noreply=patchwork.local]; ASN(0.00)[asn:63949, ipnet:172.105.96.0/20, country:SG]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.105.105.114:from] X-Rspamd-Queue-Id: CDCDF1C6EF0 X-Spam: Yes X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX From: Shao Mingyin rsnd_parse_connect_graph() uses the node returned by of_graph_get_remote_port_parent() without checking it for NULL. An endpoint node with no remote-endpoint phandle yields NULL, and the following strstr() on remote_node->full_name dereferences it during probe. Return early when the remote node is absent, so a graph link that does not lead anywhere is ignored instead of crashing the kernel. Fixes: beed78aeeb10 ("ASoC: rsnd: move HDMI information from ssi.c to core.c") Signed-off-by: Shao Mingyin Acked-by: Kuninori Morimoto diff --git a/sound/soc/renesas/rcar/core.c b/sound/soc/renesas/rcar/core.c index b7954746e953..6fba4f46868b 100644 --- a/sound/soc/renesas/rcar/core.c +++ b/sound/soc/renesas/rcar/core.c @@ -1140,6 +1140,8 @@ static void rsnd_parse_connect_graph(struct rsnd_priv *priv, return; remote_node = of_graph_get_remote_port_parent(endpoint); + if (!remote_node) + return; /* HDMI0 */ if (strstr(remote_node->full_name, "hdmi@fead0000")) {