Re: [PATCH 2/2] hwmon: (max6697) Fix underflow when writing limit attributes

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

 



On Sat, Jul 13, 2024 at 02:34:02PM -0700, Guenter Roeck wrote:
> Using DIV_ROUND_CLOSEST() on an unbound value can result in underflows.
> Indeed, module test scripts report:
> 
> temp1_max: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
> temp1_crit: Suspected underflow: [min=0, read 255000, written -9223372036854775808]
> 
> Fix by introducing an extra set of clamping.
> 
> Fixes: 5372d2d71c46 ("hwmon: Driver for Maxim MAX6697 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