On 21/02/2024 14:13, Guenter Roeck wrote:
The number of temperature configuration registers does not always match the total number of temperature registers. This can result in access errors reported if KASAN is enabled. BUG: KASAN: global-out-of-bounds in nct6775_probe+0x5654/0x6fe9 nct6775_core Reported-by: Erhard Furtner <erhard_f@xxxxxxxxxxx> Closes: https://lore.kernel.org/linux-hwmon/d51181d1-d26b-42b2-b002-3f5a4037721f@xxxxxxxxxxxx/ Fixes: 578ab5f0e4b1 ("hwmon: (nct6775) Add support for NCT6791D") Fixes: b7f1f7b2523a ("hwmon: (nct6775) Additional TEMP registers for nct6799") Cc: Ahmad Khalifa <ahmad@xxxxxxxxxx> Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> ---
Tested-by: Ahmad Khalifa <ahmad@xxxxxxxxxx> Tested on nct6799D-R without KASAN - nothing to report. Tiny note, i is in the range of 0..7 on nct6798/nct6799 if I follow correctly? Still 8 > 2, well caught. -- Regards, Ahmad