All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Chintan Vankar <c-vankar@ti.com>
Cc: Michael Walle <mwalle@kernel.org>,
	Roger Quadros <rogerq@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org, nm@ti.com,
	s-vadapalli@ti.com, danishanwar@ti.com
Subject: Re: [PATCH net] net: ethernet: ti: am65-cpsw-nuss: Fix null pointer dereference for ndev
Date: Mon, 1 Sep 2025 14:22:32 +0100	[thread overview]
Message-ID: <20250901132232.GA15473@horms.kernel.org> (raw)
In-Reply-To: <20250829121051.2031832-1-c-vankar@ti.com>

On Fri, Aug 29, 2025 at 05:40:51PM +0530, Chintan Vankar wrote:
> From: Nishanth Menon <nm@ti.com>
> 
> In the TX completion packet stage of TI SoCs with CPSW2G instance, which
> has single external ethernet port, ndev is accessed without being
> initialized if no TX packets have been processed. It results into null
> pointer dereference, causing kernel to crash. Fix this by having a check
> on the number of TX packets which have been processed.
> 
> Fixes: 9a369ae3d143 ("net: ethernet: ti: am65-cpsw: remove am65_cpsw_nuss_tx_compl_packets_2g()")
> Signed-off-by: Nishanth Menon <nm@ti.com>
> Signed-off-by: Chintan Vankar <c-vankar@ti.com>

Thanks,

I see that prior to the cited commit, the code now
in the condition updated by this patch was executed
in the loop that now precedes the conditional. And in
the flow before the cited patch ndev was always set
in the loop before the code in question runs.

Reviewed-by: Simon Horman <horms@kernel.org>

  reply	other threads:[~2025-09-01 13:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-29 12:10 [PATCH net] net: ethernet: ti: am65-cpsw-nuss: Fix null pointer dereference for ndev Chintan Vankar
2025-09-01 13:22 ` Simon Horman [this message]
2025-09-02 13:00 ` patchwork-bot+netdevbpf

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=20250901132232.GA15473@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=c-vankar@ti.com \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mwalle@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pabeni@redhat.com \
    --cc=rogerq@kernel.org \
    --cc=s-vadapalli@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.