[PATCH net 2/2] net: stmmac: fix multiplication overflow when reading timestamp
Russell King (Oracle)
linux at armlinux.org.uk
Tue Apr 22 08:32:25 PDT 2025
On Tue, Apr 22, 2025 at 05:07:23PM +0200, Alexis Lothoré wrote:
> ns = readl(ptpaddr + GMAC_PTP_ATNR);
> - ns += readl(ptpaddr + GMAC_PTP_ATSR) * NSEC_PER_SEC;
> + ns += (u64)(readl(ptpaddr + GMAC_PTP_ATSR)) * NSEC_PER_SEC;
I'm not sure what the extra parens around readl() are actually trying to
do. Please drop them if they're not useful.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
More information about the linux-arm-kernel
mailing list