]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (peci/dimmtemp) Do not provide fake thresholds data
authorPaul Fertser <fercerpav@gmail.com>
Thu, 23 Jan 2025 12:20:02 +0000 (15:20 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 12:01:52 +0000 (13:01 +0100)
commit3e92d62d9534edb31fdb1f5c115ecebf24fb93ea
tree0c08f26e6c65b97bbc1653a68c3f30091fd8611d
parent9f956dcf30650f7c3b5af3c1f15cebbfe91d9ee1
hwmon: (peci/dimmtemp) Do not provide fake thresholds data

commit 5797c04400ee117bfe459ff1e468d0ea38054ab4 upstream.

When an Icelake or Sapphire Rapids CPU isn't providing the maximum and
critical thresholds for particular DIMM the driver should return an
error to the userspace instead of giving it stale (best case) or wrong
(the structure contains all zeros after kzalloc() call) data.

The issue can be reproduced by binding the peci driver while the host is
fully booted and idle, this makes PECI interaction unreliable enough.

Fixes: 73bc1b885dae ("hwmon: peci: Add dimmtemp driver")
Fixes: 621995b6d795 ("hwmon: (peci/dimmtemp) Add Sapphire Rapids support")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Link: https://lore.kernel.org/r/20250123122003.6010-1-fercerpav@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/peci/dimmtemp.c