🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10304

[PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode

#10304
From: Fang Xieyan
Date: Tue, 03 Nov 2026 11:11
42 lines
9973 bytes
The skb passed to ipc_mux_dl_decode() through the current RX path
always has a valid data pointer.

The only caller, ipc_imem_dl_skb_process(), checks for a NULL skb
before calling ipc_mux_dl_decode(). The skb is allocated through
ipc_pcie_alloc_skb() -> ipc_pcie_alloc_local_skb() ->
__netdev_alloc_skb(), which provides a valid data buffer on
successful allocation. Allocation or DMA mapping failures return
a NULL skb instead.

Remove the redundant skb->data check.

Suggested-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Reviewed-by: Guanglei Zhu <zhugl3@xiaopeng.com>
Signed-off-by: Fang Xieyan <fangxy@xiaopeng.com>
---
Changes in v2:
- Drop the "fix potential skb leak" approach. The skb->data NULL
  condition is unreachable through the current RX path, so remove
  the redundant check instead of adding an ipc_pcie_kfree_skb() call.
- Drop the Fixes: tag because this patch does not fix a reachable bug.

 drivers/net/wwan/iosm/iosm_ipc_mux_codec.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
index 0bbd41263cc2..2b8a22980c87 100644
--- a/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
+++ b/drivers/net/wwan/iosm/iosm_ipc_mux_codec.c
@@ -693,9 +693,6 @@ void ipc_mux_dl_decode(struct iosm_mux *ipc_mux, struct sk_buff *skb)
 {
 	u32 signature;
 
-	if (!skb->data)
-		return;
-
 	/* Decode the MUX header type. */
 	signature = le32_to_cpup((__le32 *)skb->data);
 
-- 
2.50.1
Technical Details
Message-ID: <20261103111101.39235-1-fangxy@xiaopeng.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355514-linux-kernel-netdev=dewy.ru
References: <20261102081920.50288-1-fangxy@xiaopeng.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355514-linux-kernel-netdev=dewy.ru
From: fangxy@xiaopeng.com (Fang Xieyan)
Newsgroups: linux.kernel.netdev
Subject: [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
Date: Tue,  3 Nov 2026 19:11:01 +0800
Organization: Usenet Network
Message-ID: <20261103111101.39235-1-fangxy@xiaopeng.com>
References: <20261102081920.50288-1-fangxy@xiaopeng.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3159569"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:WAcsvz5FdfQLPzLiNJEFZcYoglM= sha256:1tEMsIzOLi2yDYpFx7WUyDL7Be1d/znZqK2EoVdmFak=
	sha1:+zx6jKd7aTELWNBOiK1ROy9AH0U= sha256:5f248K707fz2tASvIrMIXNFtPwRJZbBf+U3ZaYFyQL0=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 43C23112852; Tue,  3 Nov 2026 15:00:39 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.15
X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=xiaopeng.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id BIYo0gtnxQ8S;
	Tue,  3 Nov 2026 15:00:36 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-355514-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id BFFB0112850; Tue,  3 Nov 2026 15:00:21 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id AF68B61B356; Tue,  3 Nov 2026 11:18:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793704275;
	b=jJnASr7RHGkXeaslAwqpy12lcIecf89jYzlu8ejHeG8jYSstNi7cpHQ3WuOcUMkZqX1/
	 Uda9YDw/txHV9aCbttdGPlgElW/2qZ2bmaL8cDGmEsdOWTxYAsGKwU74VslIlGmYyRvFu
	 7N9MZ8+wJKAmd34ImKhZjItfVpbO2T8uhocSW376+oRh8758ZISVHRYCX4JmTlyFDe6tp
	 4hI9i7akfoiQKoOd17qw5EdZ95u1Lb9xEvhtCsvcVjqR8smtBL8M+6fwhHgTosrF9sb9v
	 RHMMlniXm4LFaVORkv7ZaY0xcMccY6YVjKFCSW+TFZMRVBAP15hLIybD6MHQEcx4S+Q==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793704275;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
	 X-Alimail-AntiSpam:Received:From:To:Cc:Subject:Date:Message-ID:
	 X-Mailer:In-Reply-To:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Transfer-Encoding;
	bh=HJXvKBetJ6+D3f3qQFBtlAFYG6QMCgZ7DblhIwwwoDU=;
	b=FlloffCYqRJzEPiCrwXXUiWeEdCg/GD0LLn7506x8ZmlKSJToDpS9JIcbu8TNCP8Gy/C
	 HOlfj/oEtPyen5hbgJljuir/9mYsoRSz7NA553gn0esaWc8G9mlqvNeEN4SddAfnrJgSJ
	 9VUSnhCgGbSExT+iVBi4r9gmcygiNkR2gQTqqw2iqTLX3bTQ6P0vKQzQ5hzWHshv3fH0y
	 4+OZLwE7fypfiO1MwHapvt+fZOjip4FfBzxtF35+bOdXuRcVz/PBXDohDUWnNG5WMAvEr
	 0JmbvCiZPQVnAIe/qkECveQYkeurTZlzy8FNAkC+gl59cJP4z9xbZRZDGMTnQBTIfKQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=dbjquFjY;
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id E7C63606FAFA;
	Tue,  3 Nov 2026 11:11:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key, unprotected) header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=dbjquFjY
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.28.5
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793704274;
	b=0nHmoJ/e75++UrSt5WtckXoHqnAklfGD+JeHlPqf60HgQrEkz/PTM4DKTRmobu5lpetR
	 kpSgLgTXgZJgJI8LVWX5LrbeWllefBxZm22J8SsfxsZpzOGula/lpoNxHZEKR8xMurHR8
	 tsmXD489T+tyb4G7b/pl0aduH2coSsvllHBGtm/2wb7lOeoV9P2C/TbVm11XBGDMS4FHG
	 2ZD5jk9fdgG1QZd1tfvWxYL0EA/8z3qG17PKd0Q0RQj4K95XkigmLXXD5Y9CSigFtwz7o
	 1DTdJmpFNHJh+mHLb6om17LoIy7AzMoxVUjbOGs0iu/KG5Nd96TK+bjF36c5z6DhR3g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793704274;
	h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:From:To:Cc:
	 Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:MIME-Version:
	 Content-Transfer-Encoding;
	bh=HJXvKBetJ6+D3f3qQFBtlAFYG6QMCgZ7DblhIwwwoDU=;
	b=Kvfn53BU/YuoVm2F3rAwmpE5BZ0fmtrjQbSi91QBLQm/fd5h+49VBfoRNq09LugTbvwD
	 Mf/KFpS3xM/sj1KDty/z54KrHo4B9RuJpBY+q0ZujdmMGLZ6wjX+iO4jUflJLglABn3O9
	 FB9Ej9kt33KCTt8Ksyf/H26bBG2pAaOh4yLmXPi1JggHMTboNwJ+z3Xr40OITzFwOmR86
	 mCpxyrMOEmo5xpiEv4Ctzpf+y7tXuFXPdniqKFzm0fR70cug4hPitfPiuIfpAemd359B0
	 yUgBAUeRuyB5/le96viA2ZYRPL7JuETWOXoSGn0Jzjrr/cPXVs/daTTeg90AITHOG4Q==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=xiaopeng.com;
	spf=pass smtp.mailfrom=xiaopeng.com;
	dkim=pass header.d=xiaopeng.com header.i=@xiaopeng.com header.a=rsa-sha256 header.s=default header.b=dbjquFjY;
	arc=none smtp.remote-ip=115.124.28.5
X-Received: from out28-5.mail.aliyun.com (out28-5.mail.aliyun.com [115.124.28.5])
	(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 06E9860A5BD0;
	Tue,  3 Nov 2026 11:11:11 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 06E9860A5BD0
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xiaopeng.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xiaopeng.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=xiaopeng.com; s=default;
	t=1793704263; h=From:To:Subject:Date:Message-ID:MIME-Version;
	bh=HJXvKBetJ6+D3f3qQFBtlAFYG6QMCgZ7DblhIwwwoDU=;
	b=dbjquFjY+H2MRTiqvXr5HtN/YqoFMmioZXNtQ+dZziZV8HvPdRO9Q6MJvsRYpnhWROu1gDYFi7S4pW99mM0lGM/Wqxeh2kGAhFPzrjcwt1jb/Vo9w5DwhDEYIkZvLdif8y78oDzYQYCSq+HsVycwZNqZ2wIJbRILhWVjPHzI7dU=
X-Alimail-AntiSpam: AC=CONTINUE;BC=0.04992287|-1;CH=green;DM=|CONTINUE|false|;DS=CONTINUE|ham_regular_dialog|0.0172255-0.00111262-0.981662;FP=15865239930251679264|0|0|0|0|-1|-1|-1;HT=maildocker-contentspam033037071049;MF=fangxy@xiaopeng.com;NM=1;PH=DS;RN=11;RT=11;SR=0;TI=SMTPD_---.jviODwI_1793704261;
X-Received: from localhost.localdomain(mailfrom:fangxy@xiaopeng.com fp:SMTPD_---.jviODwI_1793704261 cluster:ay29)
          by smtp.aliyun-inc.com;
          Tue, 03 Nov 2026 19:11:02 +0800
X-Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Johannes Berg <johannes@sipsolutions.net>,
	Guanglei Zhu <zhugl3@xiaopeng.com>
X-Mailer: git-send-email 2.50.1
X-In-Reply-To: <20261102081920.50288-1-fangxy@xiaopeng.com>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list