[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210325001800.GB6432@hoboy.vegasvil.org>
Date: Wed, 24 Mar 2021 17:18:00 -0700
From: Richard Cochran <richardcochran@...il.com>
To: Yangbo Lu <yangbo.lu@....com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ptp_qoriq: fix overflow in ptp_qoriq_adjfine() u64
calcalation
On Tue, Mar 23, 2021 at 04:02:29PM +0800, Yangbo Lu wrote:
> Current calculation for diff of TMR_ADD register value may have
> 64-bit overflow in this code line, when long type scaled_ppm is
> large.
>
> adj *= scaled_ppm;
>
> This patch is to resolve it by using mul_u64_u64_div_u64().
>
> Signed-off-by: Yangbo Lu <yangbo.lu@....com>
Acked-by: Richard Cochran <richardcochran@...il.com>
Powered by blists - more mailing lists