public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: Junrui Luo <moonafterrain@outlook.com>
Cc: ioana.ciornei@nxp.com, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, danisjiang@gmail.com
Subject: Re: [PATCH] dpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero
Date: Fri, 30 Jan 2026 02:50:09 +0000	[thread overview]
Message-ID: <176974140986.3149010.13987469540887646258.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <SYBPR01MB7881BEABA8DA896947962470AF91A@SYBPR01MB7881.ausprd01.prod.outlook.com>

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.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



      parent reply	other threads:[~2026-01-30  2:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28  8:07 [PATCH] dpaa2-switch: prevent ZERO_SIZE_PTR dereference when num_ifs is zero Junrui Luo
2026-01-28 13:48 ` Andrew Lunn
2026-01-30  2:50 ` patchwork-bot+netdevbpf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=176974140986.3149010.13987469540887646258.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=danisjiang@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moonafterrain@outlook.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox