From: Greg KH <gregkh@linuxfoundation.org>
To: Rahul Sharma <black.hawk@163.com>
Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
"Jakub Kicinski" <kuba@kernel.org>
Subject: Re: [PATCH v6.6] net: stmmac: make sure that ptp_rate is not 0 before configuring EST
Date: Thu, 8 Jan 2026 12:09:17 +0100 [thread overview]
Message-ID: <2026010804-evidence-cheek-430a@gregkh> (raw)
In-Reply-To: <20251229003117.1918863-1-black.hawk@163.com>
On Mon, Dec 29, 2025 at 08:31:17AM +0800, Rahul Sharma wrote:
> From: Alexis Lothoré <alexis.lothore@bootlin.com>
>
> If the ptp_rate recorded earlier in the driver happens to be 0, this
> bogus value will propagate up to EST configuration, where it will
> trigger a division by 0.
>
> Prevent this division by 0 by adding the corresponding check and error
> code.
>
> Suggested-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
> Fixes: 8572aec3d0dc ("net: stmmac: Add basic EST support for XGMAC")
> Link: https://patch.msgid.link/20250529-stmmac_tstamp_div-v4-2-d73340a794d5@bootlin.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> [ The context change is due to the commit c3f3b97238f6
> ("net: stmmac: Refactor EST implementation")
> which is irrelevant to the logic of this patch. ]
> Signed-off-by: Rahul Sharma <black.hawk@163.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac5.c | 5 +++++
> drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c | 5 +++++
> 2 files changed, 10 insertions(+)
What is the git id of this commit in Linus's tree?
thanks,
greg k-h
prev parent reply other threads:[~2026-01-08 11:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-29 0:31 [PATCH v6.6] net: stmmac: make sure that ptp_rate is not 0 before configuring EST Rahul Sharma
2026-01-08 11:09 ` Greg KH [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=2026010804-evidence-cheek-430a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alexis.lothore@bootlin.com \
--cc=black.hawk@163.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=stable@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