[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id:
<176974140986.3149010.13987469540887646258.git-patchwork-notify@kernel.org>
Date: Fri, 30 Jan 2026 02:50:09 +0000
From: patchwork-bot+netdevbpf@...nel.org
To: Junrui Luo <moonafterrain@...look.com>
Cc: ioana.ciornei@....com, andrew+netdev@...n.ch, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org, danisjiang@...il.com
Subject: Re: [PATCH] dpaa2-switch: prevent ZERO_SIZE_PTR dereference when
num_ifs is zero
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@...nel.org>:
On Wed, 28 Jan 2026 16:07:34 +0800 you wrote:
> The driver allocates arrays for ports, FDBs, and filter blocks using
> kcalloc() with ethsw->sw_attr.num_ifs as the element count. When the
> device reports zero interfaces (either due to hardware configuration
> or firmware issues), kcalloc(0, ...) returns ZERO_SIZE_PTR (0x10)
> instead of NULL.
>
> Later in dpaa2_switch_probe(), the NAPI initialization unconditionally
> accesses ethsw->ports[0]->netdev, which attempts to dereference
> ZERO_SIZE_PTR (address 0x10), resulting in a kernel panic.
>
> [...]
Here is the summary with links:
- dpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero
https://git.kernel.org/netdev/net/c/ed48a84a72fe
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Powered by blists - more mailing lists