mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Linkui Xiao <xiaolinkui@126.com>
Cc: maxime.chevallier@bootlin.com, kuba@kernel.org,
	davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com,
	horms@kernel.org, sdf@fomichev.me, nb@tipi-net.de,
	2022090917019@std.uestc.edu.cn, devnexen@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH net] net: ethtool: phy: fix NULL link_topo dereference in phy_prepare_data()
Date: Wed, 11 Nov 2026 14:34:36 +0100	[thread overview]
Message-ID: <1fb006fc-aab9-456d-95c2-0e94df1dfb09@lunn.ch> (raw)
In-Reply-To: <20261111072146.3293821-1-xiaolinkui@126.com>

> Reaching the crash needs an IBM EMAC device with a fixed-link node, which
> was not available here, so the fix is verified by compilation and code
> inspection only.

There is another way to look at this. The MAC driver might be broken,
it is assigning ndev->phydev, which it should not. It needs to call
one of the helpers that get to phy_attach_direct(), which sets
ndev->phydev.

Are there other MAC drivers which assign ndev->phydev?

This NULL pointer dereference can be considered good, because it might
be pointing out a bug. So we might want to keep it.

	Andrew

      reply	other threads:[~2026-11-11 13:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  7:21 Linkui Xiao
2026-11-11 13:34 ` Andrew Lunn [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=1fb006fc-aab9-456d-95c2-0e94df1dfb09@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=2022090917019@std.uestc.edu.cn \
    --cc=davem@davemloft.net \
    --cc=devnexen@gmail.com \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=stable@vger.kernel.org \
    --cc=xiaolinkui@126.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

all inboxes | Powered by JetHome®