Re: [PATCH] PM / Domains: Fix integer overflows on u32 bit multiplies

2021-03-18 Thread Rafael J. Wysocki
On Sun, Feb 7, 2021 at 11:47 PM Colin King wrote: > > From: Colin Ian King > > There are three occurrances of u32 variables being multiplied by > 1000 using 32 bit multiplies and the result being assigned to a > 64 bit signed integer. These can potentially lead to a 32 bit > overflows, so fix

Re: [PATCH] PM / Domains: Fix integer overflows on u32 bit multiplies

2021-02-07 Thread Pavel Machek
On Sun 2021-02-07 22:46:48, Colin King wrote: > From: Colin Ian King > > There are three occurrances of u32 variables being multiplied by > 1000 using 32 bit multiplies and the result being assigned to a > 64 bit signed integer. These can potentially lead to a 32 bit > overflows, so fix this by

[PATCH] PM / Domains: Fix integer overflows on u32 bit multiplies

2021-02-07 Thread Colin King
From: Colin Ian King There are three occurrances of u32 variables being multiplied by 1000 using 32 bit multiplies and the result being assigned to a 64 bit signed integer. These can potentially lead to a 32 bit overflows, so fix this by casting 1000 to a UL first to force a 64 bit multiply