[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ab26b875-c10a-47af-a1e9-591812d4113f@lunn.ch>
Date: Fri, 7 Apr 2023 16:24:06 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Radu Pirea (OSS)" <radu-nicolae.pirea@....nxp.com>
Cc: hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH net] net: phy: nxp-c45-tja11xx: fix unsigned long
multiplication overflow
On Thu, Apr 06, 2023 at 12:59:53PM +0300, Radu Pirea (OSS) wrote:
> Any multiplication between GENMASK(31, 0) and a number bigger than 1
> will be truncated because of the overflow, if the size of unsigned long
> is 32 bits.
>
> Replaced GENMASK with GENMASK_ULL to make sure that multiplication will
> be between 64 bits values.
>
> Cc: <stable@...r.kernel.org> # 5.15+
> Fixes: 514def5dd339 ("phy: nxp-c45-tja11xx: add timestamping support")
> Signed-off-by: Radu Pirea (OSS) <radu-nicolae.pirea@....nxp.com>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
Andrew
Powered by blists - more mailing lists