[PATCH] nvme-hwmon: clamp threshold input before Kelvin conversion

Christoph Hellwig hch at lst.de
Thu Dec 3 00:10:29 PST 2026


On Wed, Dec 02, 2026 at 11:49:56AM -0500, Andrew Stellman wrote:
> From: Andrew Stellman <astellman at stellman-greene.com>
> 
> nvme_set_temp_thresh() calls millicelsius_to_kelvin() before clamping
> the value. From reading the code, an input close to LONG_MAX
> overflows in that conversion, so the clamp then programs 0 K instead
> of the maximum.
> 
> Clamp the millidegree input before converting it.

Looks good:

Reviewed-by: Christoph Hellwig <hch at lst.de>




More information about the Linux-nvme mailing list