Re: [PATCH 1/2] hwmon: (max16065) Fix overflows seen when writing limits

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 21, 2024 at 12:35:05PM -0700, Guenter Roeck wrote:
> Writing large limits resulted in overflows as reported by module tests.
> 
> in0_lcrit: Suspected overflow: [max=5538, read 0, written 2147483647]
> in0_crit: Suspected overflow: [max=5538, read 0, written 2147483647]
> in0_min: Suspected overflow: [max=5538, read 0, written 2147483647]
> 
> Fix the problem by clamping prior to multiplications and the use of
> DIV_ROUND_CLOSEST, and by using consistent variable types.
> 
> Fixes: f5bae2642e3d ("hwmon: Driver for MAX16065 System Manager and compatibles")
> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Reviewed-by: Tzung-Bi Shih <tzungbi@xxxxxxxxxx>




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux