From: Xuanqiang Luo <xuanqiang.luo@linux.dev>
To: huhai <15815827059@163.com>
Cc: netdev@vger.kernel.org, huhai <huhai@kylinos.cn>,
kuba@kernel.org, andrew@lunn.ch, divya.koppera@microchip.com
Subject: Re: [PATCH] net: phy: microchip_t1: fix NULL pointer dereference in lan887x_phy_init()
Date: Wed, 2 Sep 2026 17:16:48 +0800 [thread overview]
Message-ID: <a59a2f22-dca0-443b-a0de-f580ed2c4438@linux.dev> (raw)
In-Reply-To: <20260902083342.221050-1-15815827059@163.com>
在 2026/9/2 16:33, huhai 写道:
> From: huhai <huhai@kylinos.cn>
>
> mchp_rds_ptp_probe() may return NULL when CONFIG_PTP_1588_CLOCK is disabled.
When CONFIG_MICROCHIP_PHY_RDS_PTP=n, the stub for
mchp_rds_ptp_probe() also returns NULL, even if
CONFIG_PTP_1588_CLOCK=y. Please mention this case in the commit message.
> lan887x_phy_init() only checks for an error pointer before using the returned
> clock to configure the periodic output pin, which can result in a NULL
> pointer dereference.
>
> Handle the NULL return as PTP being unavailable and skip the event pin
> configuration in that case.
>
> Fixes: 8541fc12edcd ("net: phy: microchip_t1: Enable pin out specific to lan887x phy for PEROUT signal")
> Signed-off-by: huhai <huhai@kylinos.cn>
Since this is a crash fix suitable for the net tree, please mark
the patch as [PATCH net] and add:
Cc: stable@vger.kernel.org
Thanks,
Xuanqiang
next prev parent reply other threads:[~2026-09-02 9:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 8:33 [PATCH] net: phy: microchip_t1: fix NULL pointer dereference in lan887x_phy_init() huhai
2026-09-02 8:56 ` Divya.Koppera
2026-09-02 9:16 ` Xuanqiang Luo [this message]
2026-09-02 22:58 ` Jakub Kicinski
2026-09-03 9:01 ` huhai
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=a59a2f22-dca0-443b-a0de-f580ed2c4438@linux.dev \
--to=xuanqiang.luo@linux.dev \
--cc=15815827059@163.com \
--cc=andrew@lunn.ch \
--cc=divya.koppera@microchip.com \
--cc=huhai@kylinos.cn \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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