* [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
@ 2026-11-03 14:59 Fang Xieyan
2026-11-03 15:13 ` Loic Poulain
2026-11-10 14:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 5+ messages in thread
From: Fang Xieyan @ 2026-11-03 14:59 UTC (permalink / raw)
To: Loic Poulain, Sergey Ryazanov, Andrew Lunn
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel, Johannes Berg, Guanglei Zhu
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
2026-11-03 14:59 [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode Fang Xieyan
@ 2026-11-03 15:13 ` Loic Poulain
2026-11-10 14:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: Loic Poulain @ 2026-11-03 15:13 UTC (permalink / raw)
To: Fang Xieyan
Cc: Sergey Ryazanov, Andrew Lunn, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, Johannes Berg,
Guanglei Zhu
On Tue, Nov 3, 2026 at 3:59 PM Fang Xieyan <fangxy@xiaopeng.com> wrote:
>
> 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>
On top of that, the early-return branch does not release the related resources.
Reviewed-by: Loic Poulain <loic.poulain@oss.qualcomm.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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
2026-11-03 14:59 [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode Fang Xieyan
2026-11-03 15:13 ` Loic Poulain
@ 2026-11-10 14:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-11-10 14:30 UTC (permalink / raw)
To: Fang Xieyan
Cc: loic.poulain, ryazanov.s.a, andrew+netdev, davem, edumazet, kuba,
pabeni, netdev, linux-kernel, johannes, zhugl3
Hello:
This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 3 Nov 2026 22:59:25 +0800 you wrote:
> 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.
>
> [...]
Here is the summary with links:
- [v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
https://git.kernel.org/netdev/net-next/c/66974df65a0b
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
2026-11-03 11:11 ` [PATCH v2] net: wwan: iosm: drop redundant skb->data check " Fang Xieyan
@ 2026-11-03 13:50 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2026-11-03 13:50 UTC (permalink / raw)
To: Fang Xieyan
Cc: Loic Poulain, Sergey Ryazanov, Andrew Lunn, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel,
Johannes Berg, Guanglei Zhu
On Tue, Nov 03, 2026 at 07:11:01PM +0800, Fang Xieyan wrote:
> 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:
Please always start a new thread for a new version of the patch. The
CI system does not always pick up the patch and run it.
Please also read:
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
Andrew
---
pw-bot: cr
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode
2026-11-02 8:19 [PATCH] net: wwan: iosm: fix potential skb leak " Fang Xieyan
@ 2026-11-03 11:11 ` Fang Xieyan
2026-11-03 13:50 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Fang Xieyan @ 2026-11-03 11:11 UTC (permalink / raw)
To: Loic Poulain, Sergey Ryazanov
Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel, Johannes Berg, Guanglei Zhu
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-10 14:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 14:59 [PATCH v2] net: wwan: iosm: drop redundant skb->data check in MUX DL decode Fang Xieyan
2026-11-03 15:13 ` Loic Poulain
2026-11-10 14:30 ` patchwork-bot+netdevbpf
-- strict thread matches above, loose matches on Subject: below --
2026-11-02 8:19 [PATCH] net: wwan: iosm: fix potential skb leak " Fang Xieyan
2026-11-03 11:11 ` [PATCH v2] net: wwan: iosm: drop redundant skb->data check " Fang Xieyan
2026-11-03 13:50 ` Andrew Lunn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®